Tidied code to be pushed into develop