refactored build system (little bit :) )