Removes monkey patches, and adds runtime checking of dependencies