Shuffle code to adapter file
Merge mapper into router and document routing behaviour