public function get($element, $useCache = true)
    {
        if ($useCache && isset($this->elements[$element])) {
            // return the cached version
            return $this->elements[$element];
        }

        if (isset($this->elementMap[$element])) {
            if (is_callable($this->elementMap[$element])) {
                // if we have callback, invoke it and cache the result
                $this->elements[$element] = call_user_func(
                    $this->elementMap[$element],
                    $this
                );
            } else {
                // otherwise simply cache the result and return it
                $this->elements[$element] = $this->elementMap[$element];
            }
            return $this->elements[$element];
        }

        throw new Exception('No element registered for key: '.$element);
    }