Improved build and cleanup scripts