Wrap tick function in reactor. Add send_errors decorator that we will soon use in many places. Fix imports.