more normalization and bugfixing of the new code