added grid overlay and paint events
Merge remote-tracking branch 'origin/master'