Added missing call to the the_post() and fixed formatting
Cleaning up template formatting