[Build system] review of the entire build system. refs: #49 #87