fix bug, add license, add tests, reorganize code

- Fix bug where it wouldn't halt when unable to build SLAP guide layers (formerly 'partition')
- Add MIT license
- Add end-to-end tests for computing the largest matching
- reorganize code a bit more