mapper refactor

and another piece of work added