Finished implementing matrix element extraction.