set build properties, some initial refactoring