refactored build process and file structure