Added in the bresenham line algorithm and made quex a stateless function (to allow multithreaded access)