added OnScopeExit
added contracts
added initial build script