remove unused rake upgrade tasks, fix merge errors, and reformat