Fixed bug where 1 grid on corner does not get erased.
Added documentations.