adding management pages for posts, organizing code