Add grid drawing

Had to tweak some math objects. Also modified mesh struct and code a bit,
but it will likely change again (perhaps revert).