Final fixes

Pagination links fixed
Link to the post on the thumbnail image
Code cleaned-up