Allow commands to have an initialize function

Adds the ability for commands to have a property 'init' which is a
function that runs when the command is first initialized.