Updated build scripts to automatically resolve dependencies