added some tests.
increased compatibility with other mods