Posts sort moved to dao layout
Cleaned code