Fixing bugs and minor refactoring

- fixing bug in DefaultTypeMapperImpl which caused it to fail write stri...ngs to the backing store

- minor refactoring