Implemented redraw
Refactored xMin/xMax etc.
Merge remote-tracking branch 'origin/master'