Tidied up to conform to PSR coding standards/style