remove dependency to 'kex'. Moved relevant stuff from kex to 'nn' or 'unsup'