Continue implementing the subdivision algorithm

As before, nothing has been tested yet -- debugging this thing is going
to be a bear.