Add router and hander
Convert everything else to router-handler.
Add handler for pyerr
Remove heartbeat logging