Refactoring posts views