Code trimming, adding a few comments, fixed anchor tag hrefs