removed bad code from blog_posts
some refactoring in controller