fixed git checkout bug
some refactoring, started build process