Some restructure

- Moved around some code
- Did some clean up