Refactored, Added Validation for Posts.