refactor to rails engine, update db config

fresh clone of repo, replaced most files with freshly generated engine.