Removed rendering when nothing has changed.
Updated algorithm to be a bit quicker.
Fixed bug in merging cells