Adds event callbacks, querying functions