updates build and refactoring