 	}
 	
 	private var db: NSObject? {
-		guard let type = NSClassFromString("AppwiseCore.DB") as? NSObject.Type else { return nil }
-		return type.perform(NSSelectorFromString("shared")).takeUnretainedValue() as? NSObject
+		guard let type = DBProxy.`class` as? NSObject.Type else { return nil }
+		return type.perform(DBProxy.shared).takeUnretainedValue() as? NSObject
 	}
 }
 
 // MARK: - Other
 
+private enum InfoKeys {
+	static let displayName = "CFBundleDisplayName"
+	static let shortVersion = "CFBundleShortVersionString"
+	static let version = "CFBundleVersionKey"
+}
+
 public extension Config {
 	var appName: String {
-		return Bundle.main.infoDictionary?["CFBundleDisplayName"] as! String
+		guard let value = Bundle.main.infoDictionary?[InfoKeys.displayName] as? String else { return "" }
+		return value
 	}
 
 	var appVersion: Version {
-		return Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String
+		guard let value = Bundle.main.infoDictionary?[InfoKeys.shortVersion] as? String else { return "" }
+		return value
 	}
 
 	var appBuild: String {
-		return Bundle.main.infoDictionary?["CFBundleVersion"] as! String
+		guard let value = Bundle.main.infoDictionary?[InfoKeys.version] as? String else { return "" }
+		return value
 	}
 }


// MARK: - Application lifetime

public extension Config {
	func setupApplication() {
		// if needed, reset app and exit early. At the end of reset, setup is

		Settings.shared.load(with: self)

		// initialize core data
		_ = db?.perform(DBProxy.initialize)

		// user initialize
		initialize()
