added missing shallowCopy function. Added optional scope parameter to lure.compile