build system cleanup and documentation