Move rest of misc module into main