refactoring to make codemap its own module