Edited Shortest Sequence code, and fixed it up some