Refactor Config, Spark object and boot process