Refactoring of some methods to pass around a mapper when loading relations
Added joins and select support to relation definitions