Finished the renaming process; fixed a few bugs