Update to work with current version of rails 3.2.  Some other fixes and updates.