Fixed GSX element matching, added more tests