Big commit.

Added reset button.
Changed principle of drawing coordinate grid.