from qtip.base.error import InvalidContentError
 from qtip.base.error import NotFoundError
 from qtip.cli import utils
-from qtip.cli.entry import Context
 from qtip.loader.metric import MetricSpec
 
-pass_context = click.make_pass_decorator(Context, ensure=False)
-
 
 @click.group()
-@pass_context
-def cli(ctx):
+def cli():
     ''' Performance Metrics Group '''
     pass
 
 
 @cli.command('list', help='List all the Metric Groups')
-@pass_context
-def cmd_list(ctx):
+def cmd_list():
     metrics = MetricSpec.list_all()
     table = utils.table('Metrics', metrics)
     click.echo(table)
 
 @cli.command('show', help='View details of a Metric')
 @click.argument('name')
-@pass_context
-def show(ctx, name):
+def show(name):
     try:
         metric = MetricSpec('{}.yaml'.format(name))
     except NotFoundError as nf:
 @cli.command('run', help='Run performance test')
 @click.argument('name')
 @click.option('-p', '--path', help='Path to store results')
-@pass_context
-def run(ctx, name, path):
+def run(name, path):
     runner_path = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir,
                                'runner/runner.py')
     os.system('python {0} -b {1} -d {2}'.format(runner_path, name, path))
 
 from qtip.base.error import InvalidContentError
 from qtip.base.error import NotFoundError
 from qtip.cli import utils
-from qtip.cli.entry import Context
 from qtip.loader.qpi import QPISpec
 
-pass_context = click.make_pass_decorator(Context, ensure=False)
-
 
 @click.group()
-@pass_context
-def cli(ctx):
+def cli():
     ''' Collection of performance tests '''
     pass
 
 
 @cli.command('list', help='List all the QPI specs')
-@pass_context
-def cmd_list(ctx):
+def cmd_list():
     qpis = QPISpec.list_all()
     table = utils.table('QPIs', qpis)
     click.echo(table)
 
 @cli.command('show', help='View details of a QPI')
 @click.argument('name')
-@pass_context
-def show(ctx, name):
+def show(name):
     try:
         qpi = QPISpec('{}.yaml'.format(name))
     except NotFoundError as nf:
 @cli.command('run', help='Run performance tests for the specified QPI')
 @click.argument('name')
 @click.option('-p', '--path', help='Path to store results')
-@pass_context
-def run(ctx, name, path):
+def run(name, path):
     runner_path = path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir,
                             'runner/runner.py')
     os.system('python {0} -b all -d {1}'.format(runner_path, path))
 
 
 import click
 
-from qtip.cli.entry import Context
 from qtip.reporter.console import ConsoleReporter
 
-pass_context = click.make_pass_decorator(Context, ensure=False)
-
 
 @click.group()
-@pass_context
-def cli(ctx):
+def cli():
     """ View QTIP results"""
     pass
 
 @cli.command('show')
 @click.argument('metric')
 @click.option('-p', '--path', help='Path to result directory')
-@pass_context
-def show(ctx, metric, path):
+def show(metric, path):
     reporter = ConsoleReporter({})
     report = reporter.render(metric, path)
     click.echo(report)
 
 
 import click
 import os
-import pkg_resources as pkg
 import sys
 
 from qtip.cli.commands.cmd_project import cli as project_commands
 
-CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
 
-# TODO (taseer) define user friendly error messages
 sys.tracebacklimit = 0
-
-
-class Context(object):
-    """ Load configuration and pass to subcommands """
-
-
-pass_context = click.make_pass_decorator(Context, ensure=True)
 cmd_folder = os.path.abspath(os.path.join(os.path.dirname(__file__),
                                           'commands'))
 
         return mod.cli
 
 
-@click.command(cls=SubCommand, context_settings=CONTEXT_SETTINGS,
+@click.command(cls=SubCommand,
                invoke_without_command=True)
-def sub_commands(ctx, verbose, debug):
+def sub_commands(debug):
     pass
 
 
                help="Platform performance benchmarking",
                sources=[sub_commands, project_commands],
                invoke_without_command=True)
-@click.option('-v', '--verbose', is_flag=True, help='Enable verbose mode.')
 @click.option('-d', '--debug', is_flag=True, help='Enable debug mode.')
-@click.version_option(pkg.require("qtip")[0])
-@pass_context
-def cli(ctx, verbose, debug):
+@click.version_option()
+def cli(debug):
     if debug:
         sys.tracebacklimit = 8
 
     def runner(self):
         return CliRunner()
 
-    def test_verbose(self, runner):
-        result = runner.invoke(cli, ['-v'])
-        assert result.output == ''
-
     def test_version(self, runner):
         result = runner.invoke(cli, ['--version'])
         assert re.search(r'\d+\.\d+\.\d+', result.output)