Restructuring

- Cleaning up code