various build cleanup and partitioning