Changed command handling

Added an addSubCommand method to allow hooked plugins to use main command interface