Added migrations functionality with Phinx, cleaned up modules with redundant code,