several hundreds bugfixes in cuds code