clean up blog post view by separating initial page load and ajax request logic