Issue #3: Refactoring Posts

Refactoring code base of post model and posts controller.