Cleaned up using phpcs and proper formatting (mainly newlines)