Cleaned up code.