moved globals to beginning of draw.html
added some null checking to matrix_vector_lib.js
fixed small bugs (zooming in to much messes up axis draw)