Adds deferred to build script
Test and refactors (WIP)