Cleaned up code with Tidy.