refactor autnum cleanup