Refactor: use context struct in handlers.