Fixed methods for DOMParser and GatewayTests. Still some bugs