Don't use global variables in draw_test
Fix grid_dots to not swap rows/cols. Add a method for drawing grid lines