Finished implementing matchStructure (as far as I know; haven't tested yet)