Posts model refactoring