functions, and appends links to index page...some tests still not passing though

Probably should have committed a few more times...