This is my refactoring of _alpm_remove_commit in remove.c. In the process of refactoring I noticed somethings that I changed. For example the creation of char *md5 and *sha1 which were both _alpm_needbackup(file, info->backup), so I just made one char *md5_sha1 that is _alpm_needbackup(file, info->backup) because I'm pretty sure they are the same thing and after that they were only used once in an if statement to see if they were true or not. I also moved some variables that were only used in the for statement that unlinks the files but were declared outside of it. I also noticed that within the first for statement char pm_install[PATH_MAX] was declared, then later in that for statement it was declared again in an if statement, so I changed the second pm_install to pm_install2 (can't believe that got my the compiler). As usual the patch is below. ~ Jamie / yankees26 Signed-off-by: James Rosten <seinfeld90@gmail.com>