ApplicationEventListener + test and some other small changes