Cleaned up the code.