version sorting
small bugfixes, dead code removal