Refactor controllers and helpers

move db actions to models package
refactor helpers
better controller composition
start posts controller
common methods shared between controllers