More refactoring.
Convereted a lot of classes to new style.
Added comparison methods for some types. Removed unneeded parse methods.
Some more connection tests and comparison methods.
Split kom.py into several files.