public function load($module, $instance = null)
    {
        if ( ! is_null($instance))
        {
            if ( ! $this->hasModule($module))
            {
                $this->addModule($module);
            }

            return ($this->instances[$module] = $instance);
        }

        if ($this->hasModule($module))
        {
            return ($this->instances[$module] = new $module);
        }

        throw new UnexpectedValueException("Module {$module} does not exist");
    }