Update the post count and Refactor and cleanup.