Refactor controllers and helpers

move db actions to models package
refactor helpers
better controller composition
start posts controller
database action methods shared by all models