This is a general purpose solution for handling event callbacks using object methods with a procedual API