refactored directory structure and added makefiles