correct messages for viewing closed posts, cleaned up code