app: starting to implement new hooks model

Related to #347.