Wrapped code in a wrapper

Now uses valid vector addressing in kernel
Stuff is modularized better in the kernel
Valid tests
Handling of tileset bitmask vs tileset nameset
Fix bug in kernel when getting digit of number

Was being clobbered by modding negative numbers
Added a test for this