m3tok3: cleanup, refactoring