Removes obsolete code from build.
Externalise exec wait tasks to spawn plugin.
Adds Apache 2.0 license.