AuthCode mapper, refactorings
small fixes, formatting