using pimple for file logging, setting up post entity
setting up database service, misc. restructuring and cleanup