restructure/simplify build