Made some improvements to the TableGateway, ResourceProcessor and DataMapper classes to allow handling some custom situations