Code structure clean up

- Cleaned up code base file and code structure.