Refactored build wrap commands, improved test dependency tracking