Tidyup/refactoring