Adding some tests
Cap memory usage during tests, fixed a few edge case bugs
Functions to inspect sequences