Tidied up some bits