updated possible memory states due to current limitations of design (1 bit of shadow memory per bit of application memory)
mostly functional merge sort example. very hacky code (globals in library) - need to fix this later.