Conversion to rails 4 complete

This includes modifications to many files to upgrade rails to 4.0.2