cleanup and improved build process