Changed how the brush draws. With this new method the brush wont create a dashed line when dragging the mouse really fast. Also some refactoring.