refactor: cleanup control flow in OCPP stack