Add timeout on grid draw - closes #4
Fix sorting of arrays. Fixes #5