Move all application code to static callbacks
Fixing travis