 	}
 	
 	func configurationDidChange(notification: NSNotification?) {
-		faceStyle = ClockStyle(integer: defaults.integerForKey(ClockStyleDefaultsKey))
-		backgroundStyle = ClockStyle(integer: defaults.integerForKey(BackgroundStyleDefaultsKey))
+		faceStyle = Style(integer: defaults.integerForKey(ClockStyleDefaultsKey))
+		backgroundStyle = Style(integer: defaults.integerForKey(BackgroundStyleDefaultsKey))
 		drawsTicks = defaults.boolForKey(TickMarksDefaultsKey)
 		drawsNumbers = defaults.boolForKey(NumbersDefaultsKey)
 		drawsDate = defaults.boolForKey(DateDefaultsKey)

import Cocoa
import ScreenSaver

enum ClockStyle: Int {
	case Light, Dark
	
	init(integer: Int) {
		if integer == 1 {
			self = .Dark
			return
		}
		
		self = .Light
	}
}

class ClockView: ScreenSaverView {
	
	// MARK: - Properties
	
	var faceStyle: ClockStyle = .Light
	var backgroundStyle: ClockStyle = .Dark
	var drawsTicks = true
	var drawsNumbers = true
	var drawsDate = true

		wantsLayer = true
		
		defaults.registerDefaults([
			ClockStyleDefaultsKey: Style.Light.toRaw(),
			BackgroundStyleDefaultsKey: Style.Dark.toRaw(),
			TickMarksDefaultsKey: true,
			NumbersDefaultsKey: true,
			DateDefaultsKey: true,
