added changes commented by richard, added / for home links, added comments to code