Tidied code
Tidied code