change state machine syntax to just be object based, fix bug where Models werent detached from correctly