cleaning up redirects and renders in posts controller