fixes in cor-udev etc. Some refactoring