Tidied up code

Removed unused function that came about during testing.