refactored some post and edit post templates