stomp: Made some functions const. Changed diff matrix interface.