Fix tests
Use MAX_BLOCKS correctly
Formatting