Add a bit of logging and some refactoring
status -> state
Setting the state, getting the acceptdoc