Cleaned up and code and applied proper formatting.