Make the 'create-listener' macro a bit more flexible