fix BIT (again)
debugging
use printf to show the machine state
start to clean up the SHEILA handling
more tidying up
split stuff up more