Started conversion to rails 4. Code is a MESS