Tidied up some stuff