refactor posts and comments views