Refactor Mapping DSL

I have refactored the mapping DSL. The most significant improvement is that we can specify available attributes on fields. According to tests the patch is fully backwards compatible other than unavailable attributes on fields which were used in tests previously (I have removed that attributes).