Tidied up code

Removed some no longer necessary functions.