added some tests and renamed a load of stuff
minor name changes