Locking down #185 with tests.