private function removeDefaultStructure ()
    {
        $confirm = $this->confirm ('Are you sure? It will delete some directories with all files in them.)');

        if ($confirm) {
            try {

                $this->makeBackup();

                // deleting files and folders
                if (!file_exists (HCNewProject::CONFIG))
                    $this->abort ('Missing project configuration file for laravel version');

                $json = validateJSONFromPath (HCNewProject::CONFIG);

                foreach ($json['remove_folders'] as $location)
                    $this->deleteDirectory ($location, true);

                foreach ($json['remove_files'] as $location) {
                    $this->info ('Deleting file: ' . $location);
                    File::delete ($location);
                }

                foreach ($json['create_folders'] as $location) {
                    $this->info ('Creating folder: ' . $location);
                    $this->createDirectory ($location);
                }

                $this->createFileFromTemplate ([
                    "destination"         => 'app/' . HCNewService::CONFIG_PATH,
                    "templateDestination" => __DIR__ . '/templates/shared/hc.config.hctpl',
                    "content"             => [
                        "serviceProviderNameSpace" => "app",
                    ],
                ]);

                foreach ($json['create_files'] as $source => $destinations)
                {
                    if (!is_array($destinations))
                        $this->createProjectFile($source, $destinations);
                    else
                        foreach ($destinations as $destination)
                            $this->createProjectFile($source, $destination);
                }

                foreach ($json['copy_folders'] as $source => $destinations)
                {
                    if (!is_array($destinations))
                        File::copyDirectory(__DIR__ . "/templates/$source", base_path($destinations));
                    else
                        foreach ($destinations as $destination)
                            File::copyDirectory(__DIR__ . "/templates/$source", base_path($destination));
                }


                replaceTextInFile('composer.json', ['"App\\\\"' => '"app\\\\"']);
                replaceTextInFile('config/auth.php', ['=> App\User::class' => '=> interactivesolutions\honeycombacl\app\models\HCUsers::class']);
                replaceTextInFile('config/auth.php', ['password_resets' => 'hc_users_password_resets']);
                replaceTextInFile('config/database.php', ['utf8\'' => 'utf8mb4\'', 'utf8_' => 'utf8mb4_']);

            } catch (Exception $e) {
                $this->comment ('Error occurred!');
                $this->error ('Error code: ' . $e->getCode ());
                $this->error ('Error message: ' . $e->getMessage ());
                $this->info ('');
                $this->info ('Rolling back configuration.');
                $this->restore();
                $this->abort ('');
            }
        }
    }