Tests

How can you be sure without tests? Fixed up some stuff as a result, of
course.