Intrinsic acceleration

This CL is ridiculous. Hey, at least now you have a syntax-highlighted diff!
Please add a function`is_dirty` to avoid calls to `count` all over the place.