Docear/HTW-Frontend#546, improved event handling, added tests