Fixed some naming inconsistencies and other minor cosmetic bugs.