Anorm refactoring
Merge pull request #3492 from cchantep/backport-2959

Anorm refactoring: backport #2959