Changed project structure

Changed project structure, minor refactoring.