Make hooks more declarative