Added functions to access cell state and write display actions then neatened up movement code a bit