Refactored some code to expedite resizing posts.