various tweaks, ability for memory.writebytes to use a table of numbers