Adding rails_l2factor for heroku
code cleanup and tweaks