Cleaned up code, restructured some things.