edited mapping code
changed relations file writing
added separate method for sub elements mapping
edit xml methods
added method for add Link