Refactorings

moved most of PostsRepository.get_recent_posts logic to Post class

renamed variables for increased clarity: