Turned on `-O2` and `-Wall`

This caught a bug in `scan`