Cleaned up and restructured.