Using the standard way of registering commands.
Fixes #1