merged most of the changes made in the rails app.