Modifications to make application work with rails 4