Improved build and rebuild commands