Restructuring project.

- Some initial refactoring