heavy bugfixing on depth trap search, some refactoring, api corrections etc