Restored constness of the intersectsUnit function.
Added the --threads option to the CLI.
Reimplemented the Grid class.