AshJava update by Erik Borgers

Tested the core, also added the state machines