package com.github.skanukov.sparklet;

import com.github.skanukov.sparklet.config.RouteDispatcher;
import com.github.skanukov.sparklet.config.Settings;

public class Application {
    private Settings settings;

    //<editor-fold desc="Singleton region.">
    private Application() {
    }

    // Lazy singleton initialization
    private static class SingletonHolder {
        private static final Application INSTANCE = new Application();
    }

    /**
     * Returns the MyApplication singleton instance.
     *
     * @return The MyApplication singleton instance.
     */
    public static Application getInstance() {
        return SingletonHolder.INSTANCE;
    }
    //</editor-fold>

    /**
     * Entry point for Sparklet application.
     *
     * @return The Application instance for fluent interface.
     */
    public Application init() {
        settings = Settings.load();
        new RouteDispatcher().dispatch();
        return this;
    }

    /**
     * Returns the application settings instance.
     *
     * @return The application settings instance.
     */
    public Settings getSettings() {
        return settings;
    }
}

@@ -149,22 +149,89 @@
 gs;%0A
-%0Apublic class 
+import spark.servlet.SparkApplication;%0A%0Apublic class Application implements Spark
 Appl
@@ -817,78 +817,23 @@
    *
+/
 %0A    
- * @return The Application instance for fluent interface.%0A     */
+@Override
 %0A   
@@ -840,27 +840,20 @@
  public 
-Application
+void
  init() 
@@ -936,29 +936,8 @@
 ();%0A
-        return this;%0A
     

Make Application class implement SparkApplication interface