Tidied up some functions