Tidied everything up, all working nice now