public static void main( String[] args ) throws Exception
    {
        TestingHelper.CONFIG.read();
        OptionManager.initialize( TestingHelper.CONFIG ); // initialize options from config file
        OptionManager.initialize( args ); // initialize options from commandline (override the config file)

        OptionManager.registerClass( "Scheduler", Scheduler.class );
        OptionManager.registerClass( "Test", RegionTester.class );
        System.out.println();

        TestingHelper.createDisplay();
        TestingHelper.setupGL();
        TestingHelper.initInput();

        Region region = new Region( new CGModulus(), 0, 0, 0 );
        region.rebuild();

        Camera camera = new Camera(); // the camera of the player
        camera.setMinimumPitch( 15f );
        camera.setMaximumPitch( 165f );
        Controller controller = new Controller( camera ); // the controller for the camera

        Input.setBinding( "removeBlocks", InputMedium.KEYBOARD, Keyboard.KEY_R );
        Input.setBinding( "addBlocks", InputMedium.KEYBOARD, Keyboard.KEY_F );
        Input.setBinding( "saveRegion", InputMedium.KEYBOARD, InputMode.BUTTON_RELEASED, Keyboard.KEY_O );
        Input.setBinding( "loadRegion", InputMedium.KEYBOARD, InputMode.BUTTON_RELEASED, Keyboard.KEY_L );
        Input.setBinding( "toggleVSync", InputMedium.KEYBOARD, InputMode.BUTTON_RELEASED, Keyboard.KEY_V );
        Input.setBinding( "addLighting", InputMedium.KEYBOARD, InputMode.BUTTON_RELEASED, InputMask.CONTROL_MASK, Keyboard.KEY_L );
        Input.setBinding( "remLighting", InputMedium.KEYBOARD, InputMode.BUTTON_RELEASED, InputMask.MENU_MASK, Keyboard.KEY_L );

        while ( !Display.isCloseRequested() )
        {
            glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // clear the last frame

            Input.poll(); // poll the input
            TestingHelper.processInput( camera, controller ); // move and orient the player
            if ( Input.isBindingActive( "removeBlocks" ) )
            {
                removeBlocks( region );
            }
            if ( Input.isBindingActive( "addBlocks" ) )
            {
                addBlocks( region );
            }
            if ( Input.isBindingActive( "saveRegion" ) )
            {
                saveRegion( region );
            }
            if ( Input.isBindingActive( "loadRegion" ) )
            {
                loadRegion( region );
            }
            if ( Input.isBindingActive( "toggleVSync" ) )
            {
                if ( VSyncEnabled )
                {
                    OptionManager.setValue( "VSync", "Disabled" );
                }
                else
                {
                    OptionManager.setValue( "VSync", "Enabled" );
                }
            }
            if ( Input.isBindingActive( "addLighting" ) )
            {
                TestingHelper.enableLighting();
            }
            if ( Input.isBindingActive( "remLighting" ) )
            {
                TestingHelper.disableLighting();
            }

            Scheduler.doTick(); // ticks the scheduler
            renderScene( camera, region ); // render the scene

            TestingHelper.updateDisplay( "Region Tester", FPSCap );
        }

        TestingHelper.destroy(); // destroys everything
    }