Modified the project structure.

Split the existing code in directories to prepare for unit testing.
Prepared directory structure for unit testing.