Moved some static functions around
added dumpclasses, moved some stuff around