Tidied up some structure