remove unused functions
move patchunused to its own file
move visitors to visitors subpackage