More assertions and an optimizing turtle wrapper