Minor changes.
Finished refactoring and restructuring.