Using function decorators to declare commands and hooks.