Added a fix to prevent dragging out of bounds.
Added the vertical/horizantal scroll bars.
Further tweaking of the plot function.