Issue410

and also some clean up (removing code that was not being used and required a lot of if's).

@josenavas, can you check if this solves the issue? Thanks!
This is necessary because the array needs to be typed for speed, and for some reason typing it as a boolean doesn't work (ugh). Good thing is that `uint8` and `bool` are pretty much the same thing (except for display and some bitwise operations).