Work on assertions for #137

Most of the code is in place, now we just need a good amount of testing.