posts controller and view minor refactor