Added tests of mapper, updated entity interface