diff --git a/AppDelegate.mm b/AppDelegate.mm
index d11bdc9024cfeb7606a56b4ed7aa8fde602625d3..d5aa29b3303ada20e6b7ce3bb6a56ca2148f94ef 100644
--- a/AppDelegate.mm
+++ b/AppDelegate.mm
@@ -4,39 +4,10 @@
 @implementation AppDelegate
 
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints"];
+
     self.ringWindowController = [[RingWindowController alloc] initWithWindowNibName:@"RingWindow"];
     [self.ringWindowController showWindow:nil];
 }
 
-- (PreferencesWindowController *)preferencesWindowController
-{
-    if (!_preferencesWindowController)
-    {
-        NSLog(@"Coucou");
-        _preferencesWindowController = [[PreferencesWindowController alloc] initWithWindowNibName:@"PreferencesWindow"];
-        _preferencesWindowController.window.restorable = YES;
-        _preferencesWindowController.window.restorationClass = [self class];
-        _preferencesWindowController.window.identifier = @"preferences";
-    }
-    return _preferencesWindowController;
-}
-
-- (IBAction)launchPreferencesWindow:(id)sender {
-    [[self preferencesWindowController] showWindow:nil];
-}
-
-+ (void)restoreWindowWithIdentifier:(NSString *)identifier
-                              state:(NSCoder *)state
-                  completionHandler:(void (^)(NSWindow *, NSError *))completionHandler
-{
-    NSLog(@"restoreWindowWithIdentifier: %@", identifier);
-    NSWindow *window = nil;
-    if ([identifier isEqualToString:@"preferences"])
-    {
-        AppDelegate *appDelegate = [NSApp delegate];
-        window = [[appDelegate preferencesWindowController] window];
-    }
-    completionHandler(window, nil);
-}
-
 @end
diff --git a/AudioPrefs.xib b/AudioPrefs.xib
new file mode 100644
index 0000000000000000000000000000000000000000..8cdb61ce9fe28b33c990393b5522bb3ef56350e1
--- /dev/null
+++ b/AudioPrefs.xib
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="AudioPrefsVC">
+            <connections>
+                <outlet property="view" destination="c22-O7-iKe" id="WXt-aq-iUD"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe">
+            <rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ftI-JV-7cE">
+                    <rect key="frame" x="114" y="229" width="78" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Recordings:" id="9HH-Pa-4Aq">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y73-M5-wnx">
+                    <rect key="frame" x="139" y="179" width="53" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Output:" id="2gZ-Ab-XHf">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wn2-fz-UW2">
+                    <rect key="frame" x="151" y="128" width="42" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Input:" id="x1o-rT-jy6">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IDV-b5-br4">
+                    <rect key="frame" x="128" y="81" width="65" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Ringtone:" id="Gr8-kY-X9a">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JuP-vn-Oim">
+                    <rect key="frame" x="100" y="34" width="92" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Tone settings:" id="NvN-ip-svk">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <comboBox verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="akC-1c-4RK">
+                    <rect key="frame" x="194" y="122" width="182" height="26"/>
+                    <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="On8-vq-c0G">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        <objectValues>
+                            <string>Item 1</string>
+                            <string>Item 2</string>
+                            <string>Item 3</string>
+                        </objectValues>
+                    </comboBoxCell>
+                </comboBox>
+                <comboBox verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ni4-Q8-9bE">
+                    <rect key="frame" x="194" y="75" width="182" height="26"/>
+                    <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="dSu-4c-qW0">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        <objectValues>
+                            <string>Item 1</string>
+                            <string>Item 2</string>
+                            <string>Item 3</string>
+                        </objectValues>
+                    </comboBoxCell>
+                </comboBox>
+                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Jyg-5H-Ygw">
+                    <rect key="frame" x="196" y="33" width="94" height="18"/>
+                    <buttonCell key="cell" type="check" title="Mute DTMF" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="pAA-Iv-EmI">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+                <comboBox verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sxm-vJ-peN">
+                    <rect key="frame" x="194" y="173" width="182" height="26"/>
+                    <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="FDZ-VU-Kwv">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        <objectValues>
+                            <string>Item 1</string>
+                            <string>Item 2</string>
+                            <string>Item 3</string>
+                        </objectValues>
+                    </comboBoxCell>
+                </comboBox>
+            </subviews>
+            <point key="canvasLocation" x="388" y="254"/>
+        </customView>
+    </objects>
+</document>
diff --git a/AudioPrefsVC.h b/AudioPrefsVC.h
new file mode 100644
index 0000000000000000000000000000000000000000..45124c0227663946b100f97a07fec17fcc7cc48a
--- /dev/null
+++ b/AudioPrefsVC.h
@@ -0,0 +1,13 @@
+//
+//  AudioPrefsVC.h
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-19.
+//
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface AudioPrefsVC : NSViewController
+
+@end
diff --git a/AudioPrefsVC.mm b/AudioPrefsVC.mm
new file mode 100644
index 0000000000000000000000000000000000000000..79bb926d9cfcdb68d2ae89d813370b134452ec19
--- /dev/null
+++ b/AudioPrefsVC.mm
@@ -0,0 +1,18 @@
+//
+//  AudioPrefsVC.m
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-19.
+//
+//
+
+#import "AudioPrefsVC.h"
+
+@interface AudioPrefsVC ()
+
+@end
+
+@implementation AudioPrefsVC
+
+
+@end
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 176cd07f68b7a417c435b3f48734202c6f95ebfb..77c35a23215dc3476eac57e3a2f76fdce872bcd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,21 +29,30 @@ SET(ringclient_SRCS
    AppDelegate.mm
    RingWindowController.mm
    ConversationsViewController.mm
-   PreferencesWindowController.mm
+   PreferencesViewController.mm
    QNSTreeController.mm
+   AudioPrefsVC.mm
+   VideoPrefsVC.mm
+   GeneralPrefsVC.mm
    HistoryViewController.mm
-   MinimalHistoryBackend.cpp)
+   MinimalHistoryBackend.mm)
 
 SET(ringclient_FORMS
    MainMenu.xib
    RingWindow.xib
-   PreferencesWindow.xib)
+   GeneralPrefs.xib
+   AudioPrefs.xib
+   VideoPrefs.xib
+   PreferencesScreen.xib)
 
 SET(ringclient_HDRS
    AppDelegate.h
    RingWindowController.h
    ConversationsViewController.h
-   PreferencesWindowController.h
+   PreferencesViewController.h
+   AudioPrefsVC.h
+   VideoPrefsVC.h
+   GeneralPrefsVC.h
    HistoryViewController.h
    QNSTreeController.h
    MinimalHistoryBackend.h)
@@ -65,6 +74,10 @@ ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_cancel.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_email.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_new_email.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_search.png
+${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ancrage.png
+${CMAKE_CURRENT_SOURCE_DIR}/data/dark/audio.png
+${CMAKE_CURRENT_SOURCE_DIR}/data/dark/general.png
+${CMAKE_CURRENT_SOURCE_DIR}/data/dark/video.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_video.png)
 SET_SOURCE_FILES_PROPERTIES(${ring_ICONS} PROPERTIES
        MACOSX_PACKAGE_LOCATION Resources)
@@ -79,8 +92,6 @@ ADD_EXECUTABLE(${PROJ_NAME} MACOSX_BUNDLE
    ${myApp_ICON}
    ${ring_ICONS})
 
-MESSAGE("Hello" ${Qt5Core_LIBRARIES})
-
 TARGET_LINK_LIBRARIES( ${PROJ_NAME}
    ${LIB_RING_CLIENT_LIBRARY}
    ${Qt5Core_LIBRARIES}
@@ -89,6 +100,8 @@ TARGET_LINK_LIBRARIES( ${PROJ_NAME}
 
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppKit")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Cocoa")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Quartz")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AVFoundation")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AddressBook")
 
 SET_TARGET_PROPERTIES(${PROJ_NAME} PROPERTIES
diff --git a/GeneralPrefs.xib b/GeneralPrefs.xib
new file mode 100644
index 0000000000000000000000000000000000000000..4c8847166cf4b16350cb8f7da4a2f4da26eadfdc
--- /dev/null
+++ b/GeneralPrefs.xib
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="GeneralPrefsVC">
+            <connections>
+                <outlet property="view" destination="c22-O7-iKe" id="kqH-6G-Ohq"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe">
+            <rect key="frame" x="0.0" y="0.0" width="562" height="272"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kYQ-jU-skU">
+                    <rect key="frame" x="57" y="226" width="143" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Desktop Notifications:" id="xlz-zw-IJI">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dPI-8j-Y0b">
+                    <rect key="frame" x="113" y="117" width="87" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Calls History:" id="ss6-63-XJO">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lIm-zX-RIV">
+                    <rect key="frame" x="76" y="172" width="124" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Window behaviour:" id="sog-Ok-Y0N">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Oth-up-2k2">
+                    <rect key="frame" x="204" y="224" width="147" height="18"/>
+                    <buttonCell key="cell" type="check" title="Enable Notifications" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="uCL-ye-tsv">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DgD-2y-4g5">
+                    <rect key="frame" x="204" y="115" width="195" height="18"/>
+                    <buttonCell key="cell" type="check" title="Keep my history for at least" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="3Pb-Ec-zl5">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rF1-Fa-8rV">
+                    <rect key="frame" x="83" y="63" width="121" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Instant Messaging:" id="afz-zn-9IW">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QmA-ZI-ZL5">
+                    <rect key="frame" x="450" y="110" width="19" height="27"/>
+                    <stepperCell key="cell" continuous="YES" alignment="left" maxValue="100" id="30B-YQ-Opa"/>
+                </stepper>
+                <textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tHZ-7Q-5iP">
+                    <rect key="frame" x="405" y="113" width="40" height="22"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="center" title="30" drawsBackground="YES" id="JvS-c4-OeT">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nah-Jm-ZYB">
+                    <rect key="frame" x="472" y="117" width="33" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="days" id="e5K-l0-Nfw">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Is4-pD-LOT">
+                    <rect key="frame" x="204" y="170" width="294" height="18"/>
+                    <buttonCell key="cell" type="check" title="Bring Ring to foreground on incoming calls" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="uYI-hA-JHk">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LRd-Zc-tRd">
+                    <rect key="frame" x="204" y="62" width="182" height="18"/>
+                    <buttonCell key="cell" type="check" title="Enable instant messaging" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="6UW-Db-jnY">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+            </subviews>
+            <point key="canvasLocation" x="374" y="349"/>
+        </customView>
+    </objects>
+</document>
diff --git a/GeneralPrefsVC.h b/GeneralPrefsVC.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ce27a6523e99056e676289433e89c21fe5a0dc4
--- /dev/null
+++ b/GeneralPrefsVC.h
@@ -0,0 +1,13 @@
+//
+//  GeneralPrefsVC.h
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-19.
+//
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface GeneralPrefsVC : NSViewController
+
+@end
diff --git a/GeneralPrefsVC.mm b/GeneralPrefsVC.mm
new file mode 100644
index 0000000000000000000000000000000000000000..fe8eaf4d4b1027da6917a2d6d5876e1481fa5328
--- /dev/null
+++ b/GeneralPrefsVC.mm
@@ -0,0 +1,22 @@
+//
+//  GeneralPrefsVC.m
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-19.
+//
+//
+
+#import "GeneralPrefsVC.h"
+
+@interface GeneralPrefsVC ()
+
+@end
+
+@implementation GeneralPrefsVC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do view setup here.
+}
+
+@end
diff --git a/HistoryViewController.mm b/HistoryViewController.mm
index dc9fc8ac70fd546395905d549fa8003ff2d2b0f9..e3066892c3266a1de30ac9ba859854e57c068c90 100644
--- a/HistoryViewController.mm
+++ b/HistoryViewController.mm
@@ -7,7 +7,6 @@
 //
 
 #import "HistoryViewController.h"
-#import "MinimalHistoryBackend.h"
 
 #import <historymodel.h>
 
@@ -50,8 +49,8 @@
     NSInteger idx = [historyView columnWithIdentifier:COLUMNID_HISTORY];
     [[[[self.historyView tableColumns] objectAtIndex:idx] headerCell] setStringValue:@"Name"];
 
-    HistoryModel::instance()->addBackend(new MinimalHistoryBackend(nil),
-                                         LoadOptions::FORCE_ENABLED);
+    //HistoryModel::instance()->addBackend(new MinimalHistoryBackend(nil),
+    //                                     LoadOptions::FORCE_ENABLED);
 
 }
 
diff --git a/MainMenu.xib b/MainMenu.xib
index d8fbf6a87f46f22482da61f0df29b983c93798f3..a959effb37eef4a25bbe9bc8c4cc1efd773a7c08 100644
--- a/MainMenu.xib
+++ b/MainMenu.xib
@@ -1948,6 +1948,14 @@
 					</object>
 					<int key="connectionID">535</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">openPreferences:</string>
+						<reference key="source" ref="1014"/>
+						<reference key="destination" ref="609285721"/>
+					</object>
+					<int key="connectionID">588</int>
+				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBActionConnection" key="connection">
 						<string key="label">addFontTrait:</string>
@@ -1988,14 +1996,6 @@
 					</object>
 					<int key="connectionID">425</int>
 				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">launchPreferencesWindow:</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="609285721"/>
-					</object>
-					<int key="connectionID">587</int>
-				</object>
 			</array>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<array key="orderedObjects">
@@ -3140,7 +3140,7 @@
 			<nil key="activeLocalization"/>
 			<dictionary class="NSMutableDictionary" key="localizations"/>
 			<nil key="sourceID"/>
-			<int key="maxID">587</int>
+			<int key="maxID">588</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3153,21 +3153,57 @@
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
-					<string key="className">AppDelegate</string>
-					<object class="NSMutableDictionary" key="actions">
-						<string key="NS.key.0">launchPreferencesWindow:</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="NSMutableDictionary" key="actionInfosByName">
-						<string key="NS.key.0">launchPreferencesWindow:</string>
-						<object class="IBActionInfo" key="NS.object.0">
-							<string key="name">launchPreferencesWindow:</string>
+					<string key="className">RingWindowController</string>
+					<string key="superclassName">NSWindowController</string>
+					<dictionary class="NSMutableDictionary" key="actions">
+						<string key="closePreferences:">NSToolbarItem</string>
+						<string key="openPreferences:">id</string>
+					</dictionary>
+					<dictionary class="NSMutableDictionary" key="actionInfosByName">
+						<object class="IBActionInfo" key="closePreferences:">
+							<string key="name">closePreferences:</string>
+							<string key="candidateClassName">NSToolbarItem</string>
+						</object>
+						<object class="IBActionInfo" key="openPreferences:">
+							<string key="name">openPreferences:</string>
 							<string key="candidateClassName">id</string>
 						</object>
+					</dictionary>
+					<object class="NSMutableDictionary" key="outlets">
+						<string key="NS.key.0">currentView</string>
+						<string key="NS.object.0">NSView</string>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<string key="NS.key.0">currentView</string>
+						<object class="IBToOneOutletInfo" key="NS.object.0">
+							<string key="name">currentView</string>
+							<string key="candidateClassName">NSView</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../RingWindowController.h</string>
 					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">RingWindowController</string>
+					<dictionary class="NSMutableDictionary" key="actions">
+						<string key="closePreferences:">NSToolbarItem</string>
+						<string key="openPreferences:">id</string>
+					</dictionary>
+					<dictionary class="NSMutableDictionary" key="actionInfosByName">
+						<object class="IBActionInfo" key="closePreferences:">
+							<string key="name">closePreferences:</string>
+							<string key="candidateClassName">NSToolbarItem</string>
+						</object>
+						<object class="IBActionInfo" key="openPreferences:">
+							<string key="name">openPreferences:</string>
+							<string key="candidateClassName">id</string>
+						</object>
+					</dictionary>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../AppDelegate.mm</string>
+						<string key="minorKey">../../RingWindowController.mm</string>
 					</object>
 				</object>
 			</array>
diff --git a/MinimalHistoryBackend.mm b/MinimalHistoryBackend.mm
new file mode 100644
index 0000000000000000000000000000000000000000..064533f92882a3cd259fea4abb9e9ba22f85f2c6
--- /dev/null
+++ b/MinimalHistoryBackend.mm
@@ -0,0 +1,242 @@
+/************************************************************************************
+ *   Copyright (C) 2014-2015 by Savoir-Faire Linux                                       *
+ *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>         *
+ *                                                                                  *
+ *   This library is free software; you can redistribute it and/or                  *
+ *   modify it under the terms of the GNU Lesser General Public                     *
+ *   License as published by the Free Software Foundation; either                   *
+ *   version 2.1 of the License, or (at your option) any later version.             *
+ *                                                                                  *
+ *   This library is distributed in the hope that it will be useful,                *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of                 *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU              *
+ *   Lesser General Public License for more details.                                *
+ *                                                                                  *
+ *   You should have received a copy of the GNU Lesser General Public               *
+ *   License along with this library; if not, write to the Free Software            *
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA *
+ ***********************************************************************************/
+#include "minimalhistorybackend.h"
+
+//Qt
+#include <QtCore/QFile>
+#include <QtCore/QHash>
+#include <QtCore/qcoreapplication.h>
+
+//Ring
+#include "call.h"
+#include "account.h"
+#include "phonenumber.h"
+#include "historymodel.h"
+
+
+
+MinimalHistoryBackend::~MinimalHistoryBackend()
+{
+
+}
+
+bool MinimalHistoryEditor::save(const Call* item)
+{
+   Q_UNUSED(item)
+   return false;
+}
+
+bool MinimalHistoryEditor::append(const Call* item)
+{
+   Q_UNUSED(item)
+   return false;
+}
+
+bool MinimalHistoryEditor::remove(Call* item)
+{
+   Q_UNUSED(item)
+   return false;
+}
+
+bool MinimalHistoryEditor::edit( Call* item)
+{
+   Q_UNUSED(item)
+   return false;
+}
+
+bool MinimalHistoryEditor::addNew( Call* item)
+{
+   Q_UNUSED(item)
+   return false;
+}
+
+QVector<Call*> MinimalHistoryEditor::items() const
+{
+   return QVector<Call*>();
+}
+
+QString MinimalHistoryBackend::name () const
+{
+   return QObject::tr("Minimal history backend");
+}
+
+QString MinimalHistoryBackend::category () const
+{
+   return QObject::tr("History");
+}
+
+QVariant MinimalHistoryBackend::icon() const
+{
+   return QVariant();
+}
+
+bool MinimalHistoryBackend::isEnabled() const
+{
+   return true;
+}
+
+bool MinimalHistoryBackend::load()
+{
+   QFile file(QCoreApplication::applicationDirPath() +"/history.ini");
+   if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
+      QMap<QString,QString> hc;
+      while (!file.atEnd()) {
+         QByteArray line = file.readLine().trimmed();
+
+         //The item is complete
+         if ((line.isEmpty() || !line.size()) && hc.size()) {
+            Call* pastCall = Call::buildHistoryCall(hc);
+            if (pastCall->peerName().isEmpty()) {
+               pastCall->setPeerName(QObject::tr("Unknown"));
+            }
+            pastCall->setRecordingPath(hc[ Call::HistoryMapFields::RECORDING_PATH ]);
+            pastCall->setBackend(this);
+            m_pMediator->addItem(pastCall);
+            hc.clear();
+         }
+         // Add to the current set
+         else {
+            const int idx = line.indexOf("=");
+            if (idx >= 0)
+               hc[line.left(idx)] = line.right(line.size()-idx-1);
+         }
+      }
+      return true;
+   }
+   else
+      qWarning() << "History doesn't exist or is not readable";
+   return false;
+}
+
+bool MinimalHistoryBackend::reload()
+{
+   return false;
+}
+
+
+// bool MinimalHistoryBackend::append(const Call* call)
+// {
+//    if (call->backend() == this  || call->id().isEmpty()) return false;
+//    //TODO support \r and \n\r end of line
+//    QFile file(KStandardDirs::locateLocal("appdata","")+"history.ini");
+//    if ( file.open(QIODevice::Append | QIODevice::Text) ) {
+//       const QString direction = (call->direction()==Call::Direction::INCOMING)?
+//          Call::HistoryStateName::INCOMING : Call::HistoryStateName::OUTGOING;
+//       QTextStream streamFileOut(&file);
+//       const Account* a = call->account();
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::CALLID          ).arg(call->id()                     );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::TIMESTAMP_START ).arg(call->startTimeStamp()         );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::TIMESTAMP_STOP  ).arg(call->stopTimeStamp()          );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::ACCOUNT_ID      ).arg(a?QString(a->id()):""          );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::DISPLAY_NAME    ).arg(call->peerName()               );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::PEER_NUMBER     ).arg(call->peerPhoneNumber()->uri() );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::DIRECTION       ).arg(direction                      );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::MISSED          ).arg(call->isMissed()               );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::RECORDING_PATH  ).arg(call->recordingPath()          );
+//       streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::CONTACT_USED    ).arg(false                          );//TODO
+//       if (call->peerPhoneNumber()->contact()) {
+//          streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::CONTACT_UID  ).arg(
+//             QString(call->peerPhoneNumber()->contact()->uid())
+//          );
+//       }
+//       streamFileOut << "\n";
+//       streamFileOut.flush();
+//       file.close();
+//       return true;
+//    }
+//    else
+//       qWarning() << "Unable to save history";
+//    return false;
+// }
+
+/** Rewrite the file from scratch
+ * @todo Eventually check if it is necessary, it will be faster
+ */
+// bool MinimalHistoryBackend::save(const Call* call)
+// {
+//    Q_UNUSED(call)
+//    if (call->backend() != this)
+//       append(call);
+// 
+//    //TODO, need to regenerate everything
+//    /*QFile file(KStandardDirs::locateLocal("appdata","")+"history.ini");
+//    if ( file.open(QIODevice::WriteOnly | QIODevice::Text) ) {
+//       foreach(const Call* call, HistoryModel::instance()->getHistoryCalls()) {
+//          qDebug() << "HERE" << call->id();
+//       }
+//       return true;
+//    }*/
+//    return false;
+// }
+
+CollectionInterface::SupportedFeatures MinimalHistoryBackend::supportedFeatures() const
+{
+   return (CollectionInterface::SupportedFeatures) (
+      CollectionInterface::SupportedFeatures::NONE  |
+      CollectionInterface::SupportedFeatures::LOAD  |
+      CollectionInterface::SupportedFeatures::CLEAR |
+//       CollectionInterface::SupportedFeatures::REMOVE|
+      CollectionInterface::SupportedFeatures::ADD   );
+}
+
+///Edit 'item', the implementation may be a GUI or somehting else
+// bool MinimalHistoryBackend::edit( Call* call)
+// {
+//    Q_UNUSED(call)
+//    return false;
+// }
+
+
+// bool MinimalHistoryBackend::remove ( Call* c )
+// {
+//    Q_UNUSED(c)
+//    qDebug() << "Removing item is not yet supported";
+//    return true;
+// }
+
+///Add a new item to the backend
+// bool MinimalHistoryBackend::addNew( Call* call)
+// {
+//    Q_UNUSED(call)
+//    return true;
+// }
+
+///Add a new phone number to an existing item
+// bool MinimalHistoryBackend::addPhoneNumber( Call* call , PhoneNumber* number )
+// {
+//    Q_UNUSED(call)
+//    Q_UNUSED(number)
+//    return false;
+// }
+
+bool MinimalHistoryBackend::clear()
+{
+    QFile::remove(QCoreApplication::applicationDirPath()+"/history.ini");
+}
+
+QByteArray MinimalHistoryBackend::id() const
+{
+   return "mhb";
+}
+
+// QList<Call*> MinimalHistoryBackend::items() const
+// {
+//    return QList<Call*>(); //TODO
+// }
+
diff --git a/PreferencesScreen.xib b/PreferencesScreen.xib
new file mode 100644
index 0000000000000000000000000000000000000000..18a6038b30433f2431487966e87111e025b492a2
--- /dev/null
+++ b/PreferencesScreen.xib
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="PreferencesViewController">
+            <connections>
+                <outlet property="view" destination="tP7-RI-Nc4" id="eQD-Q2-z2h"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView wantsLayer="YES" focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="tP7-RI-Nc4">
+            <rect key="frame" x="0.0" y="0.0" width="817" height="506"/>
+            <point key="canvasLocation" x="338.5" y="195"/>
+        </customView>
+    </objects>
+</document>
diff --git a/PreferencesViewController.h b/PreferencesViewController.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a5efce601fd93617d5138fbb5bbf33954659eb6
--- /dev/null
+++ b/PreferencesViewController.h
@@ -0,0 +1,26 @@
+//
+//  PreferenceWindowController.h
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-03.
+//
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface PreferencesViewController : NSViewController <NSToolbarDelegate>
+
+- (void) close;
+@property (nonatomic, assign) NSViewController *currentVC;
+@property (nonatomic, assign) NSViewController *generalPrefsVC;
+@property (nonatomic, assign) NSViewController *audioPrefsVC;
+@property (nonatomic, assign) NSViewController *videoPrefsVC;
+
+- (void)displayGeneral:(NSToolbarItem *)sender;
+- (void)displayAudio:(NSToolbarItem *)sender;
+- (void)displayAncrage:(NSToolbarItem *)sender;
+- (void)displayVideo:(NSToolbarItem *)sender;
+
+@end
+
+
diff --git a/PreferencesViewController.mm b/PreferencesViewController.mm
new file mode 100644
index 0000000000000000000000000000000000000000..4c560756ce8a14cd36bac0301006fd35e3fea452
--- /dev/null
+++ b/PreferencesViewController.mm
@@ -0,0 +1,189 @@
+//
+//  PreferenceWindowController.m
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-03.
+//
+//
+
+#import "PreferencesViewController.h"
+#import <QuartzCore/QuartzCore.h>
+
+#import "GeneralPrefsVC.h"
+#import "AudioPrefsVC.h"
+#import "VideoPrefsVC.h"
+
+@interface PreferencesViewController ()
+
+@end
+
+@implementation PreferencesViewController
+
+static NSString* const kGeneralPrefsIdentifier = @"GeneralPrefsIdentifier";
+static NSString* const kAudioPrefsIdentifer = @"AudioPrefsIdentifer";
+static NSString* const kAncragePrefsIdentifer = @"AncragePrefsIdentifer";
+static NSString* const kVideoPrefsIdentifer = @"VideoPrefsIdentifer";
+static NSString* const kDonePrefsIdentifer = @"DonePrefsIdentifer";
+
+-(void)loadView
+{
+    [super loadView];
+
+    [self displayGeneral:nil];
+
+    [self.view setWantsLayer:YES];
+    self.view.layer.backgroundColor = [NSColor windowBackgroundColor].CGColor;
+
+    // Set the layer redraw policy. This would be better done in
+    // the initialization method of a NSView subclass instead of here.
+    self.view.layerContentsRedrawPolicy = NSViewLayerContentsRedrawDuringViewResize;
+
+    CGRect frame = CGRectOffset(self.view.frame, 0, -self.view.frame.size.height);
+
+    CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position"];
+    animation.fromValue = [NSValue valueWithPoint:frame.origin];
+    animation.toValue = [NSValue valueWithPoint:self.view.frame.origin];
+    animation.duration = 0.3f;
+    [animation setTimingFunction:[CAMediaTimingFunction functionWithControlPoints:.7 :0.9 :1 :1]];
+
+
+    [self.view.layer addAnimation:animation forKey:animation.keyPath];
+    self.view.layer.position = frame.origin;
+}
+
+- (void) close
+{
+    NSLog(@"closingprefs");
+    CGRect frame = CGRectOffset(self.view.frame, 0, -self.view.frame.size.height);
+
+    [CATransaction begin];
+    CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position"];
+    animation.fromValue = [NSValue valueWithPoint:self.view.frame.origin];
+    animation.toValue = [NSValue valueWithPoint:frame.origin];
+    animation.duration = 0.3f;
+    [animation setTimingFunction:[CAMediaTimingFunction functionWithControlPoints:.7 :0.9 :1 :1]];
+
+    [CATransaction setCompletionBlock:^{
+        [self.view removeFromSuperview];
+    }];
+
+
+    [self.view.layer addAnimation:animation forKey:animation.keyPath];
+    [CATransaction commit];
+}
+
+- (void)displayGeneral:(NSToolbarItem *)sender {
+    NSLog(@"GEEENERALL");
+    if (self.currentVC != nil) {
+        [self.currentVC.view removeFromSuperview];
+    }
+    self.generalPrefsVC = [[GeneralPrefsVC alloc] initWithNibName:@"GeneralPrefs" bundle:nil];
+    [self.view addSubview:self.generalPrefsVC.view];
+    [self.generalPrefsVC.view setFrame:[self.view bounds]];
+    self.currentVC = self.generalPrefsVC;
+}
+
+- (void)displayAudio:(NSToolbarItem *)sender {
+    if (self.currentVC != nil) {
+        [self.currentVC.view removeFromSuperview];
+    }
+    self.audioPrefsVC = [[AudioPrefsVC alloc] initWithNibName:@"AudioPrefs" bundle:nil];
+    [self.view addSubview:self.audioPrefsVC.view];
+    [self.audioPrefsVC.view setFrame:[self.view bounds]];
+    self.currentVC = self.audioPrefsVC;
+}
+
+- (void)displayAncrage:(NSToolbarItem *)sender {
+
+}
+
+- (void)displayVideo:(NSToolbarItem *)sender {
+    if (self.currentVC != nil) {
+        [self.currentVC.view removeFromSuperview];
+    }
+    self.videoPrefsVC = [[VideoPrefsVC alloc] initWithNibName:@"VideoPrefs" bundle:nil];
+    [self.view addSubview:self.videoPrefsVC.view];
+    [self.videoPrefsVC.view setFrame:[self.view bounds]];
+    self.currentVC = self.videoPrefsVC;
+}
+
+
+#pragma NSToolbar Delegate
+
+-(NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
+{
+    NSToolbarItem* item = nil;
+
+    if ([itemIdentifier isEqualToString: kGeneralPrefsIdentifier]) {
+        item = [[NSToolbarItem alloc] initWithItemIdentifier: kGeneralPrefsIdentifier];
+        [item setImage: [NSImage imageNamed: @"general"]];
+        [item setLabel: @"General"];
+        [item setAction:@selector(displayGeneral:)];
+    }
+
+    if ([itemIdentifier isEqualToString: kAudioPrefsIdentifer]) {
+        item = [[NSToolbarItem alloc] initWithItemIdentifier: kAudioPrefsIdentifer];
+        [item setImage: [NSImage imageNamed: @"audio"]];
+        [item setLabel: @"Audio"];
+        [item setAction:@selector(displayAudio:)];
+    }
+
+    if ([itemIdentifier isEqualToString: kAncragePrefsIdentifer]) {
+        item = [[NSToolbarItem alloc] initWithItemIdentifier: kAncragePrefsIdentifer];
+        [item setImage: [NSImage imageNamed: @"ancrage"]];
+        [item setLabel: @"Ancrage"];
+        [item setAction:@selector(displayAncrage:)];
+    }
+
+    if ([itemIdentifier isEqualToString: kDonePrefsIdentifer]) {
+        item = [[NSToolbarItem alloc] initWithItemIdentifier: kDonePrefsIdentifer];
+        [item setImage: [NSImage imageNamed: @"ic_action_cancel"]];
+        [item setLabel: @"Done"];
+        [item setAction:@selector(closePreferences:)];
+    }
+
+    if ([itemIdentifier isEqualToString: kVideoPrefsIdentifer]) {
+        item = [[NSToolbarItem alloc] initWithItemIdentifier: kVideoPrefsIdentifer];
+        [item setImage: [NSImage imageNamed: @"video"]];
+        [item setLabel: @"Video"];
+        [item setAction:@selector(displayVideo:)];
+    }
+
+    return item;
+
+}
+
+-(NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar
+{
+    return [NSArray arrayWithObjects:
+            NSToolbarSpaceItemIdentifier,
+            NSToolbarFlexibleSpaceItemIdentifier,
+            kGeneralPrefsIdentifier,
+            kAudioPrefsIdentifer,
+            kVideoPrefsIdentifer,
+            kAncragePrefsIdentifer,
+            NSToolbarFlexibleSpaceItemIdentifier,
+            kDonePrefsIdentifer,
+            nil];
+}
+
+-(NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
+{
+    return [NSArray arrayWithObjects:
+            kGeneralPrefsIdentifier,
+            kAudioPrefsIdentifer,
+            kAncragePrefsIdentifer,
+            kVideoPrefsIdentifer,
+            nil];
+}
+
+-(NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar
+{
+    return nil;
+}
+
+
+
+
+
+@end
diff --git a/RingWindow.xib b/RingWindow.xib
index c0764010ebc7a3c0c57f662f1adb666e823c360d..26e4b3dcde1f6f0f3512cea3369479a4cd5cc969 100644
--- a/RingWindow.xib
+++ b/RingWindow.xib
@@ -7,8 +7,9 @@
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="RingWindowController">
             <connections>
-                <outlet property="callUriTextField" destination="uL1-rr-hj0" id="g8F-4G-1oI"/>
+                <outlet property="currentView" destination="se5-gp-TjO" id="Sae-7F-MB3"/>
                 <outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
+                <outlet property="windowView" destination="se5-gp-TjO" id="Enr-gP-asz"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
@@ -16,47 +17,28 @@
         <window title="Ring" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="196" y="240" width="781" height="487"/>
+            <rect key="contentRect" x="196" y="240" width="1065" height="626"/>
             <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1050"/>
-            <view key="contentView" id="se5-gp-TjO">
-                <rect key="frame" x="0.0" y="0.0" width="781" height="487"/>
+            <view key="contentView" autoresizesSubviews="NO" id="se5-gp-TjO">
+                <rect key="frame" x="0.0" y="0.0" width="1065" height="626"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uL1-rr-hj0">
-                        <rect key="frame" x="20" y="445" width="306" height="22"/>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="sil-2N-5Wz">
-                            <font key="font" metaFont="system"/>
-                            <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                        </textFieldCell>
-                    </textField>
-                    <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SIv-wg-z9p">
-                        <rect key="frame" x="328" y="439" width="64" height="32"/>
-                        <buttonCell key="cell" type="push" title="Call" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="0gt-3R-vVa">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="system"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="placeCall:" target="-2" id="dmp-mu-BzA"/>
-                        </connections>
-                    </button>
                     <tabView focusRingType="none" fixedFrame="YES" type="bottomTabsBezelBorder" translatesAutoresizingMaskIntoConstraints="NO" id="xXW-iq-GcP">
-                        <rect key="frame" x="9" y="14" width="384" height="427"/>
+                        <rect key="frame" x="13" y="14" width="384" height="427"/>
                         <font key="font" metaFont="system"/>
                         <tabViewItems>
                             <tabViewItem label="History" identifier="1" id="Wi9-Zd-O1N">
                                 <view key="view" id="h2E-qI-upQ">
-                                    <rect key="frame" x="10" y="7" width="364" height="389"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                     <subviews>
                                         <scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9uI-D5-KRt">
-                                            <rect key="frame" x="-3" y="-6" width="370" height="398"/>
+                                            <rect key="frame" x="-3" y="-395" width="370" height="398"/>
                                             <clipView key="contentView" misplaced="YES" id="eME-fQ-3QX">
                                                 <rect key="frame" x="1" y="17" width="238" height="117"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                 <subviews>
                                                     <outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="3Mm-vF-0m3" indentationPerLevel="16" autoresizesOutlineColumn="YES" outlineTableColumn="pTT-gU-NVa" id="rr8-UC-gGF">
-                                                        <rect key="frame" x="0.0" y="0.0" width="171" height="19"/>
+                                                        <rect key="frame" x="0.0" y="0.0" width="368" height="19"/>
                                                         <autoresizingMask key="autoresizingMask"/>
                                                         <size key="intercellSpacing" width="3" height="2"/>
                                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -103,96 +85,156 @@
                                 <view key="view" id="pkc-Vr-KaR">
                                     <rect key="frame" x="10" y="7" width="364" height="389"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                    <subviews>
+                                        <scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uSW-wV-jgA">
+                                            <rect key="frame" x="-3" y="5" width="370" height="386"/>
+                                            <clipView key="contentView" misplaced="YES" id="teg-nj-5g1">
+                                                <rect key="frame" x="1" y="17" width="238" height="117"/>
+                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                <subviews>
+                                                    <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="1R3-0U-i5y" indentationPerLevel="16" outlineTableColumn="vsd-Kj-tgi" id="net-CU-6Pr">
+                                                        <rect key="frame" x="0.0" y="0.0" width="119" height="19"/>
+                                                        <autoresizingMask key="autoresizingMask"/>
+                                                        <size key="intercellSpacing" width="3" height="2"/>
+                                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                                        <tableColumns>
+                                                            <tableColumn width="116" minWidth="40" maxWidth="1000" id="vsd-Kj-tgi">
+                                                                <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
+                                                                    <font key="font" metaFont="smallSystem"/>
+                                                                    <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                                    <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                                                </tableHeaderCell>
+                                                                <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="F1l-ce-gHn">
+                                                                    <font key="font" metaFont="system"/>
+                                                                    <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                                </textFieldCell>
+                                                                <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                                            </tableColumn>
+                                                        </tableColumns>
+                                                    </outlineView>
+                                                </subviews>
+                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                            </clipView>
+                                            <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="743-H8-ZNq">
+                                                <rect key="frame" x="1" y="119" width="223" height="15"/>
+                                                <autoresizingMask key="autoresizingMask"/>
+                                            </scroller>
+                                            <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="cdr-l3-THF">
+                                                <rect key="frame" x="224" y="17" width="15" height="102"/>
+                                                <autoresizingMask key="autoresizingMask"/>
+                                            </scroller>
+                                            <tableHeaderView key="headerView" id="1R3-0U-i5y">
+                                                <rect key="frame" x="0.0" y="0.0" width="238" height="17"/>
+                                                <autoresizingMask key="autoresizingMask"/>
+                                            </tableHeaderView>
+                                        </scrollView>
+                                    </subviews>
                                 </view>
                             </tabViewItem>
                         </tabViewItems>
                     </tabView>
-                    <scrollView focusRingType="none" fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bqQ-DB-Z0g">
-                        <rect key="frame" x="441" y="98" width="275" height="322"/>
-                        <clipView key="contentView" focusRingType="none" misplaced="YES" id="1so-Pz-QB2">
-                            <rect key="frame" x="1" y="17" width="238" height="117"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            <subviews>
-                                <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="nuM-bu-a6l" indentationPerLevel="16" outlineTableColumn="VDO-Cu-h8f" id="zcl-pp-rGb">
-                                    <rect key="frame" x="0.0" y="0.0" width="238" height="117"/>
+                    <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tSW-YT-asL">
+                        <rect key="frame" x="427" y="69" width="309" height="447"/>
+                        <subviews>
+                            <scrollView focusRingType="none" fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bqQ-DB-Z0g">
+                                <rect key="frame" x="20" y="11" width="275" height="322"/>
+                                <clipView key="contentView" focusRingType="none" misplaced="YES" id="1so-Pz-QB2">
+                                    <rect key="frame" x="1" y="17" width="238" height="117"/>
+                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                    <subviews>
+                                        <outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="nuM-bu-a6l" indentationPerLevel="16" outlineTableColumn="VDO-Cu-h8f" id="zcl-pp-rGb">
+                                            <rect key="frame" x="0.0" y="0.0" width="273" height="19"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <size key="intercellSpacing" width="3" height="2"/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                            <tableColumns>
+                                                <tableColumn identifier="ConversationsColumn" width="270" minWidth="40" maxWidth="1000" id="VDO-Cu-h8f">
+                                                    <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
+                                                        <font key="font" metaFont="smallSystem"/>
+                                                        <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                        <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                                    </tableHeaderCell>
+                                                    <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="fca-40-NK1">
+                                                        <font key="font" metaFont="system"/>
+                                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                        <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                    </textFieldCell>
+                                                    <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                                </tableColumn>
+                                            </tableColumns>
+                                            <connections>
+                                                <outlet property="delegate" destination="txt-J3-pzW" id="6In-PG-OW4"/>
+                                            </connections>
+                                        </outlineView>
+                                    </subviews>
+                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                </clipView>
+                                <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="Fze-JQ-8rU">
+                                    <rect key="frame" x="1" y="119" width="223" height="15"/>
                                     <autoresizingMask key="autoresizingMask"/>
-                                    <size key="intercellSpacing" width="3" height="2"/>
-                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                    <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
-                                    <tableColumns>
-                                        <tableColumn identifier="ConversationsColumn" width="270" minWidth="40" maxWidth="1000" id="VDO-Cu-h8f">
-                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                            </tableHeaderCell>
-                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="fca-40-NK1">
-                                                <font key="font" metaFont="system"/>
-                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        </tableColumn>
-                                    </tableColumns>
-                                    <connections>
-                                        <outlet property="delegate" destination="txt-J3-pzW" id="h5V-qh-ZKV"/>
-                                    </connections>
-                                </outlineView>
-                            </subviews>
-                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                        </clipView>
-                        <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="Fze-JQ-8rU">
-                            <rect key="frame" x="1" y="119" width="223" height="15"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </scroller>
-                        <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="e1E-df-1Rw">
-                            <rect key="frame" x="224" y="17" width="15" height="102"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </scroller>
-                        <tableHeaderView key="headerView" id="nuM-bu-a6l">
-                            <rect key="frame" x="0.0" y="0.0" width="238" height="17"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </tableHeaderView>
-                    </scrollView>
+                                </scroller>
+                                <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="e1E-df-1Rw">
+                                    <rect key="frame" x="224" y="17" width="15" height="102"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                </scroller>
+                                <tableHeaderView key="headerView" id="nuM-bu-a6l">
+                                    <rect key="frame" x="0.0" y="0.0" width="238" height="17"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                </tableHeaderView>
+                            </scrollView>
+                            <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SIv-wg-z9p">
+                                <rect key="frame" x="14" y="379" width="64" height="32"/>
+                                <buttonCell key="cell" type="push" title="Call" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="0gt-3R-vVa">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="placeCall:" target="txt-J3-pzW" id="Kqn-M7-Zqx"/>
+                                </connections>
+                            </button>
+                            <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TLn-7x-ekk">
+                                <rect key="frame" x="91" y="379" width="70" height="32"/>
+                                <buttonCell key="cell" type="push" title="Hold" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="uAm-ag-EFO">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                            </button>
+                            <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gU5-lZ-BvR">
+                                <rect key="frame" x="168" y="379" width="90" height="32"/>
+                                <buttonCell key="cell" type="push" title="Hangup" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="xpJ-nm-Bg6">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                            </button>
+                            <textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uL1-rr-hj0">
+                                <rect key="frame" x="20" y="415" width="250" height="22"/>
+                                <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="sil-2N-5Wz">
+                                    <font key="font" metaFont="system"/>
+                                    <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                </textFieldCell>
+                            </textField>
+                            <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Iny-6e-BBx">
+                                <rect key="frame" x="91" y="338" width="89" height="32"/>
+                                <buttonCell key="cell" type="push" title="preview" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rwC-ls-8XK">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="startPreview:" target="txt-J3-pzW" id="yds-UF-819"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                    </customView>
                 </subviews>
             </view>
-            <toolbar key="toolbar" implicitIdentifier="235EC6BD-FED3-4293-A455-08C845E93277" autosavesConfiguration="NO" displayMode="iconAndLabel" sizeMode="regular" id="NAm-PS-XJ0">
-                <allowedToolbarItems>
-                    <toolbarItem implicitItemIdentifier="NSToolbarShowColorsItem" id="KcU-uv-zdR"/>
-                    <toolbarItem implicitItemIdentifier="NSToolbarShowFontsItem" id="Qdh-FP-Wn3"/>
-                    <toolbarItem implicitItemIdentifier="NSToolbarPrintItem" id="Zz4-0N-Tmk"/>
-                    <toolbarItem implicitItemIdentifier="NSToolbarSpaceItem" id="9xb-70-Kdw"/>
-                    <toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="KNT-Re-jzS"/>
-                    <toolbarItem implicitItemIdentifier="EB5CD41F-F02F-4E53-839F-BEBDD556B503" label="Custom View" paletteLabel="Custom View" id="nkm-Ak-WPh">
-                        <nil key="toolTip"/>
-                        <size key="minSize" width="82" height="32"/>
-                        <size key="maxSize" width="82" height="32"/>
-                        <button key="view" verticalHuggingPriority="750" id="lp5-KU-AAm">
-                            <rect key="frame" x="0.0" y="0.0" width="82" height="32"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                            <buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="hhB-C9-Bdm">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                        </button>
-                    </toolbarItem>
-                    <toolbarItem implicitItemIdentifier="9FEF2F53-F4D0-4AE7-9FEC-5E62F95DB5EB" label="Settings" paletteLabel="Settings" id="Rg9-Xq-x5w">
-                        <nil key="toolTip"/>
-                        <size key="minSize" width="48" height="48"/>
-                        <size key="maxSize" width="48" height="48"/>
-                        <imageView key="view" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="Uaa-pG-Lcp">
-                            <rect key="frame" x="0.0" y="0.0" width="48" height="48"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                            <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="m9t-bF-ZNS"/>
-                        </imageView>
-                    </toolbarItem>
-                </allowedToolbarItems>
-                <defaultToolbarItems/>
-            </toolbar>
             <connections>
                 <outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
             </connections>
-            <point key="canvasLocation" x="46.5" y="588.5"/>
+            <point key="canvasLocation" x="204.5" y="343"/>
         </window>
         <viewController id="jzj-dD-ryc" customClass="HistoryViewController">
             <connections>
@@ -202,8 +244,9 @@
         </viewController>
         <viewController id="txt-J3-pzW" customClass="ConversationsViewController">
             <connections>
+                <outlet property="callUriTextField" destination="uL1-rr-hj0" id="YbK-vC-zee"/>
                 <outlet property="conversationsView" destination="zcl-pp-rGb" id="YXp-WN-UmC"/>
-                <outlet property="view" destination="zcl-pp-rGb" id="qZ5-1d-uzo"/>
+                <outlet property="view" destination="tSW-YT-asL" id="fv5-ly-rk8"/>
             </connections>
         </viewController>
     </objects>
diff --git a/RingWindowController.h b/RingWindowController.h
index d2d50e6e86ade0e80aac6719776216d25f6d9dfa..7da1560d685ff769f7b2d7243aae34745c930913 100644
--- a/RingWindowController.h
+++ b/RingWindowController.h
@@ -8,15 +8,15 @@
 
 #import <Cocoa/Cocoa.h>
 #import "HistoryViewController.h"
+#import "PreferencesViewController.h"
 
 @interface RingWindowController : NSWindowController {
-    NSTextField *callUriTextField;
-
+    IBOutlet NSView *currentView;
 }
+@property (nonatomic, assign) NSViewController *myCurrentViewController;
+@property PreferencesViewController* preferencesViewController;
 
-@property (assign) IBOutlet NSTextField *callUriTextField;
-
-- (IBAction)placeCall:(NSButton *)sender;
-
+- (IBAction)openPreferences:(id)sender;
+- (IBAction)closePreferences:(NSToolbarItem *)sender;
 
 @end
diff --git a/RingWindowController.mm b/RingWindowController.mm
index 54563ea7e5e994b93361e986d694272a005d39e5..ea00d3cee8c1346ca14468a08f76d4539fce795e 100644
--- a/RingWindowController.mm
+++ b/RingWindowController.mm
@@ -20,20 +20,10 @@
 @end
 
 @implementation RingWindowController
-@synthesize callUriTextField;
 
 - (void)windowDidLoad {
     [super windowDidLoad];
-    
-    Account* acc = AccountModel::instance()->currentAccount();
-    
-    NSLog(@"Current account is:%@", acc->alias().toNSString());
-    
     [self connectSlots];
-    
-        
-    // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-    
 }
 
 
@@ -50,9 +40,87 @@
     
 }
 
-- (IBAction)placeCall:(NSButton *)sender {
-    Call* mainCall_ = CallModel::instance()->dialingCall();
-    mainCall_->setDialNumber(QString::fromNSString([self.callUriTextField stringValue]));
-    mainCall_->performAction(Call::Action::ACCEPT);
+- (IBAction)openPreferences:(id)sender
+{
+
+    if(self.preferencesViewController != nil)
+        return;
+    NSToolbar* tb = [[NSToolbar alloc] initWithIdentifier: @"PreferencesToolbar"];
+
+
+
+    self.preferencesViewController = [[PreferencesViewController alloc] initWithNibName:@"PreferencesScreen" bundle:nil];
+
+    self.myCurrentViewController = self.preferencesViewController;
+
+    NSLayoutConstraint* test = [NSLayoutConstraint constraintWithItem:self.preferencesViewController.view
+                                                            attribute:NSLayoutAttributeWidth
+                                                            relatedBy:NSLayoutRelationEqual
+                                                               toItem:currentView
+                                                            attribute:NSLayoutAttributeWidth
+                                                           multiplier:1.0f
+                                                             constant:0.0f];
+
+    NSLayoutConstraint* test2 = [NSLayoutConstraint constraintWithItem:self.preferencesViewController.view
+                                                             attribute:NSLayoutAttributeHeight
+                                                             relatedBy:NSLayoutRelationEqual
+                                                                toItem:currentView
+                                                             attribute:NSLayoutAttributeHeight
+                                                            multiplier:1.0f
+                                                              constant:0.0f];
+
+    NSLayoutConstraint* test3 = [NSLayoutConstraint constraintWithItem:self.preferencesViewController.view
+                                                             attribute:NSLayoutAttributeCenterX
+                                                             relatedBy:NSLayoutRelationEqual
+                                                                toItem:currentView
+                                                             attribute:NSLayoutAttributeCenterX
+                                                            multiplier:1.0f
+                                                              constant:0.0f];
+
+
+    [currentView addSubview:[self.preferencesViewController view]];
+
+    [tb setDelegate: self.preferencesViewController];
+    [self.window setToolbar: tb];
+
+    [self.window.toolbar setSelectedItemIdentifier:@"GeneralPrefsIdentifier"];
+
+    [currentView addConstraint:test];
+    [currentView addConstraint:test2];
+    [currentView addConstraint:test3];
+    // make sure we automatically resize the controller's view to the current window size
+    [[self.myCurrentViewController view] setFrame:[currentView bounds]];
+
+    // set the view controller's represented object to the number of subviews in that controller
+    // (our NSTextField's value binding will reflect this value)
+    [self.myCurrentViewController setRepresentedObject:[NSNumber numberWithUnsignedInteger:[[[self.myCurrentViewController view] subviews] count]]];
+    
+}
+
+- (IBAction) closePreferences:(NSToolbarItem *)sender {
+    if(self.myCurrentViewController != nil)
+    {
+        [self.preferencesViewController close];
+        [self.window setToolbar:nil];
+        self.preferencesViewController = nil;
+    }
+}
+
+// FIXME: This is sick, NSWindowController is catching my selectors
+- (void)displayGeneral:(NSToolbarItem *)sender {
+    [self.preferencesViewController displayGeneral:sender];
+}
+
+- (void)displayAudio:(NSToolbarItem *)sender {
+    [self.preferencesViewController displayAudio:sender];
+}
+
+- (void)displayAncrage:(NSToolbarItem *)sender {
+    [self.preferencesViewController displayAncrage:sender];
+}
+
+- (void)displayVideo:(NSToolbarItem *)sender {
+    [self.preferencesViewController displayVideo:sender];
 }
+
 @end
diff --git a/VideoPrefs.xib b/VideoPrefs.xib
new file mode 100644
index 0000000000000000000000000000000000000000..2341d852b3832e47de163e9dce0b75a5adf31274
--- /dev/null
+++ b/VideoPrefs.xib
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="VideoPrefsVC">
+            <connections>
+                <outlet property="view" destination="c22-O7-iKe" id="EfM-Op-S9T"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe">
+            <rect key="frame" x="0.0" y="0.0" width="683" height="609"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DTo-76-fYS">
+                    <rect key="frame" x="71" y="369" width="53" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Camera" id="YCM-JC-jin">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <customView wantsLayer="YES" canDrawConcurrently="YES" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qAJ-w8-a6Q" userLabel="Preview">
+                    <rect key="frame" x="106" y="104" width="470" height="230"/>
+                </customView>
+                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Upa-iB-KCC">
+                    <rect key="frame" x="124" y="358" width="122" height="32"/>
+                    <buttonCell key="cell" type="push" title="Start preview" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="bX7-eQ-8Ea">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                </button>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VWx-4c-7aF">
+                    <rect key="frame" x="116" y="550" width="50" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Device:" id="170-NP-CSP">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y00-jB-8Ux">
+                    <rect key="frame" x="106" y="505" width="60" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Channel:" id="IJ5-l7-dN7">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cDr-8B-RiJ">
+                    <rect key="frame" x="132" y="460" width="34" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Size:" id="4bq-ls-mCp">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="60X-MX-gun">
+                    <rect key="frame" x="130" y="413" width="36" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Rate:" id="5Im-df-jdd">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5L8-b6-N3k">
+                    <rect key="frame" x="170" y="544" width="189" height="26"/>
+                    <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="PLA-b4-Y2Z" id="6Vf-hb-26C">
+                        <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="menu"/>
+                        <menu key="menu" id="zJ9-1a-cpr">
+                            <items>
+                                <menuItem title="Item 1" state="on" id="PLA-b4-Y2Z"/>
+                                <menuItem title="Item 2" id="AqV-S1-JqC"/>
+                                <menuItem title="Item 3" id="CkU-QC-dVQ"/>
+                            </items>
+                        </menu>
+                    </popUpButtonCell>
+                </popUpButton>
+                <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="weW-fX-GwJ">
+                    <rect key="frame" x="170" y="500" width="189" height="26"/>
+                    <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="jp0-zC-w4a" id="TPq-dw-EwN">
+                        <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="menu"/>
+                        <menu key="menu" id="9bI-4N-gfG">
+                            <items>
+                                <menuItem title="Item 1" state="on" id="jp0-zC-w4a"/>
+                                <menuItem title="Item 2" id="WQz-Y3-iY1"/>
+                                <menuItem title="Item 3" id="gky-36-FHp"/>
+                            </items>
+                        </menu>
+                    </popUpButtonCell>
+                </popUpButton>
+                <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Aec-P9-KNS">
+                    <rect key="frame" x="170" y="455" width="189" height="26"/>
+                    <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="n8r-LT-t3t" id="6ly-dX-MT4">
+                        <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="menu"/>
+                        <menu key="menu" id="ykd-50-las">
+                            <items>
+                                <menuItem title="Item 1" state="on" id="n8r-LT-t3t"/>
+                                <menuItem title="Item 2" id="jUy-xn-1kn"/>
+                                <menuItem title="Item 3" id="obd-cQ-mz8"/>
+                            </items>
+                        </menu>
+                    </popUpButtonCell>
+                </popUpButton>
+                <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="e3h-qA-wZ5">
+                    <rect key="frame" x="170" y="408" width="189" height="26"/>
+                    <popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="GFu-rO-tr4" id="pDt-c4-Fhs">
+                        <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="menu"/>
+                        <menu key="menu" id="aKL-76-vSP">
+                            <items>
+                                <menuItem title="Item 1" state="on" id="GFu-rO-tr4"/>
+                                <menuItem title="Item 2" id="aF9-ac-MF4"/>
+                                <menuItem title="Item 3" id="FoN-dd-DcF"/>
+                            </items>
+                        </menu>
+                    </popUpButtonCell>
+                </popUpButton>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="WNL-Ul-Jbr">
+                    <rect key="frame" x="526" y="342" width="52" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Preview" id="Lrq-tD-NYF">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FRq-3r-0WL">
+                    <rect key="frame" x="71" y="575" width="61" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Selection" id="VqO-Gm-CbB">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+            </subviews>
+            <point key="canvasLocation" x="428.5" y="407.5"/>
+        </customView>
+    </objects>
+</document>
diff --git a/VideoPrefsVC.h b/VideoPrefsVC.h
new file mode 100644
index 0000000000000000000000000000000000000000..c9f8bac46c6c8ae43b9413ac0fb865308cf8b6b3
--- /dev/null
+++ b/VideoPrefsVC.h
@@ -0,0 +1,13 @@
+//
+//  VideoPrefsVC.h
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-20.
+//
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface VideoPrefsVC : NSViewController
+
+@end
diff --git a/VideoPrefsVC.mm b/VideoPrefsVC.mm
new file mode 100644
index 0000000000000000000000000000000000000000..2bfb02d2eda290d8622a38454e77cb824a0e25de
--- /dev/null
+++ b/VideoPrefsVC.mm
@@ -0,0 +1,22 @@
+//
+//  VideoPrefsVC.m
+//  Ring
+//
+//  Created by Alexandre Lision on 2015-02-20.
+//
+//
+
+#import "VideoPrefsVC.h"
+
+@interface VideoPrefsVC ()
+
+@end
+
+@implementation VideoPrefsVC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do view setup here.
+}
+
+@end
diff --git a/data/dark/ancrage.png b/data/dark/ancrage.png
new file mode 100644
index 0000000000000000000000000000000000000000..06635f38ed1c8dbab8a3109d1d8394bea07c2388
Binary files /dev/null and b/data/dark/ancrage.png differ
diff --git a/data/dark/audio.png b/data/dark/audio.png
new file mode 100644
index 0000000000000000000000000000000000000000..9f14c5da708b03ad28555634ea965de2fffca85b
Binary files /dev/null and b/data/dark/audio.png differ
diff --git a/data/dark/general.png b/data/dark/general.png
new file mode 100644
index 0000000000000000000000000000000000000000..ef66577b71aa900075d469e75b078fa0703d4e85
Binary files /dev/null and b/data/dark/general.png differ
diff --git a/data/dark/video.png b/data/dark/video.png
new file mode 100644
index 0000000000000000000000000000000000000000..4ae69d4ef2baf2308fe8bc8bfab47f28b965d853
Binary files /dev/null and b/data/dark/video.png differ
diff --git a/minimalhistorybackend.cpp b/minimalhistorybackend.cpp
deleted file mode 100644
index b11d05b7cd0cf1360b9eed2f2e976ec885573b1a..0000000000000000000000000000000000000000
--- a/minimalhistorybackend.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/************************************************************************************
- *   Copyright (C) 2014 by Savoir-Faire Linux                                       *
- *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>         *
- *                                                                                  *
- *   This library is free software; you can redistribute it and/or                  *
- *   modify it under the terms of the GNU Lesser General Public                     *
- *   License as published by the Free Software Foundation; either                   *
- *   version 2.1 of the License, or (at your option) any later version.             *
- *                                                                                  *
- *   This library is distributed in the hope that it will be useful,                *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of                 *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU              *
- *   Lesser General Public License for more details.                                *
- *                                                                                  *
- *   You should have received a copy of the GNU Lesser General Public               *
- *   License along with this library; if not, write to the Free Software            *
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA *
- ***********************************************************************************/
-#include "MinimalHistoryBackend.h"
-
-//Qt
-#include <QtCore/QFile>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QHash>
-
-//SFLPhone
-#include "call.h"
-#include "account.h"
-#include "phonenumber.h"
-#include "historymodel.h"
-
-MinimalHistoryBackend::MinimalHistoryBackend(QObject* parent) : AbstractHistoryBackend(nullptr,parent)
-{
-    setObjectName("MinimalHistoryBackend");
-}
-
-MinimalHistoryBackend::~MinimalHistoryBackend()
-{
-    
-}
-
-QString MinimalHistoryBackend::name () const
-{
-    return "Minimal history backend";
-}
-
-QVariant MinimalHistoryBackend::icon() const
-{
-    return QVariant();
-}
-
-bool MinimalHistoryBackend::isEnabled() const
-{
-    return true;
-}
-
-bool MinimalHistoryBackend::load()
-{
-    QFile file(QCoreApplication::applicationDirPath() + "/history.ini");
-    if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
-        QMap<QString,QString> hc;
-        while (!file.atEnd()) {
-            QByteArray line = file.readLine().trimmed();
-            
-            //The item is complete
-            if ((line.isEmpty() || !line.size()) && hc.size()) {
-                Call* pastCall = Call::buildHistoryCall(hc);
-                if (pastCall->peerName().isEmpty()) {
-                    pastCall->setPeerName(tr("Unknown"));
-                }
-                pastCall->setRecordingPath(hc[ Call::HistoryMapFields::RECORDING_PATH ]);
-                pastCall->setBackend(this);
-                emit newHistoryCallAdded(pastCall);
-                hc.clear();
-            }
-            // Add to the current set
-            else {
-                const int idx = line.indexOf("=");
-                if (idx >= 0)
-                    hc[line.left(idx)] = line.right(line.size()-idx-1);
-            }
-        }
-        return true;
-    }
-    else
-        qWarning() << "History doesn't exist or is not readable";
-    return false;
-}
-
-bool MinimalHistoryBackend::reload()
-{
-    return false;
-}
-
-
-bool MinimalHistoryBackend::append(const Call* call)
-{
-    if (call->backend() == this  || call->id().isEmpty()) return false;
-    //TODO support \r and \n\r end of line
-    QFile file(QCoreApplication::applicationDirPath()+"/history.ini");
-    if ( file.open(QIODevice::Append | QIODevice::Text) ) {
-        const QString direction = (call->direction()==Call::Direction::INCOMING)?
-        Call::HistoryStateName::INCOMING : Call::HistoryStateName::OUTGOING;
-        QTextStream streamFileOut(&file);
-        const Account* a = call->account();
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::CALLID          ).arg(call->id()                     );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::TIMESTAMP_START ).arg(call->startTimeStamp()         );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::TIMESTAMP_STOP  ).arg(call->stopTimeStamp()          );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::ACCOUNT_ID      ).arg(a?a->alias():""                   );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::DISPLAY_NAME    ).arg(call->peerName()               );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::PEER_NUMBER     ).arg(call->peerPhoneNumber()->uri() );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::DIRECTION       ).arg(direction                      );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::MISSED          ).arg(call->isMissed()               );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::RECORDING_PATH  ).arg(call->recordingPath()          );
-        streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::CONTACT_USED    ).arg(false                          );//TODO
-        if (call->peerPhoneNumber()->contact()) {
-            streamFileOut << QString("%1=%2\n").arg(Call::HistoryMapFields::CONTACT_UID  ).arg(
-                                                                                               QString(call->peerPhoneNumber()->contact()->uid())
-                                                                                               );
-        }
-        streamFileOut << "\n";
-        streamFileOut.flush();
-        file.close();
-        return true;
-    }
-    else
-        qWarning() << "Unable to save history";
-    return false;
-}
-
-/** Rewrite the file from scratch
- * @todo Eventually check if it is necessary, it will be faster
- */
-bool MinimalHistoryBackend::save(const Call* call)
-{
-    if (call->backend() != this)
-        append(call);
-    return false;
-}
-
-/** Rewrite the file from scratch
- * @todo Eventually check if it is necessary, it will be faster
- */
-bool MinimalHistoryBackend::batchSave(QList<Call*> calls)
-{
-    Q_UNUSED(calls)
-    
-    return false;
-}
-
-AbstractHistoryBackend::SupportedFeatures MinimalHistoryBackend::supportedFeatures() const
-{
-    return (AbstractHistoryBackend::SupportedFeatures) (
-                                                        AbstractHistoryBackend::SupportedFeatures::NONE  |
-                                                        AbstractHistoryBackend::SupportedFeatures::LOAD  |
-                                                        AbstractHistoryBackend::SupportedFeatures::CLEAR |
-                                                        AbstractHistoryBackend::SupportedFeatures::ADD   );
-}
-
-///Edit 'item', the implementation may be a GUI or somehting else
-bool MinimalHistoryBackend::edit( Call* call)
-{
-    Q_UNUSED(call)
-    return false;
-}
-
-
-bool MinimalHistoryBackend::remove ( Call* c )
-{
-    Q_UNUSED(c)
-    qDebug() << "Removing item is not yet supported";
-    return true;
-}
-
-///Add a new item to the backend
-bool MinimalHistoryBackend::addNew( Call* call)
-{
-    Q_UNUSED(call)
-    return true;
-}
-
-///Add a new phone number to an existing item
-bool MinimalHistoryBackend::addPhoneNumber( Call* call , PhoneNumber* number )
-{
-    Q_UNUSED(call)
-    Q_UNUSED(number)
-    return false;
-}
-
-bool MinimalHistoryBackend::clear()
-{
-    //const int ret = KMessageBox::questionYesNo(static_cast<QApplication*>(QApplication::instance())->activeWindow(), i18n("Are you sure you want to clear history?"), i18n("Clear history"));
-    //if (ret == KMessageBox::Yes) {
-    QFile::remove(QCoreApplication::applicationDirPath()+"/history.ini");
-    return true;
-    //}
-    //return false;
-}
-
-QByteArray MinimalHistoryBackend::id() const
-{
-    return "mhb";
-}
-
-QList<Call*> MinimalHistoryBackend::items() const
-{
-    return QList<Call*>(); //TODO
-}
-
diff --git a/minimalhistorybackend.h b/minimalhistorybackend.h
index 01af61fe34cf315adb56167274261f8277f5bac6..9ec028245d82de5c7b6b226f77aad59f348c7e13 100644
--- a/minimalhistorybackend.h
+++ b/minimalhistorybackend.h
@@ -1,5 +1,5 @@
 /************************************************************************************
- *   Copyright (C) 2014 by Savoir-Faire Linux                                       *
+ *   Copyright (C) 2014-2015 by Savoir-Faire Linux                                  *
  *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>         *
  *                                                                                  *
  *   This library is free software; you can redistribute it and/or                  *
@@ -19,38 +19,68 @@
 #ifndef MINIMALHISTORYBACKEND_H
 #define MINIMALHISTORYBACKEND_H
 
-#include "abstractitembackend.h"
+#include "collectioninterface.h"
+#include "collectioneditor.h"
 
-class LIB_EXPORT MinimalHistoryBackend : public AbstractHistoryBackend
+class Call;
+
+template<typename T> class CollectionMediator;
+
+class LIB_EXPORT MinimalHistoryBackend : public CollectionInterface
+{
+public:
+   template<typename T>
+   explicit MinimalHistoryBackend(CollectionMediator<T>* mediator);
+   virtual ~MinimalHistoryBackend();
+
+   virtual bool load() override;
+   virtual bool reload() override;
+   virtual bool clear() override;
+//    virtual bool save(const Call* call) override;
+//    virtual bool append(const Call* item) override;
+
+   virtual QString    name     () const override;
+   virtual QString    category () const override;
+   virtual QVariant   icon     () const override;
+   virtual bool       isEnabled() const override;
+   virtual QByteArray id       () const override;
+//    virtual bool remove ( Call* c ) override;
+
+   virtual SupportedFeatures  supportedFeatures() const override;
+
+//    virtual QList<Call*> items() const override;
+
+   ///Edit 'item', the implementation may be a GUI or somehting else
+//    virtual bool edit( Call* call) override;
+   ///Add a new item to the backend
+//    virtual bool addNew( Call* call) override;
+
+   ///Add a new phone number to an existing item
+//    virtual bool addPhoneNumber( Call* call , PhoneNumber* number ) override;
+private:
+   CollectionMediator<Call>*  m_pMediator;
+};
+
+class MinimalHistoryEditor : public CollectionEditor<Call>
 {
 public:
-    explicit MinimalHistoryBackend(QObject* parent = nullptr);
-    virtual ~MinimalHistoryBackend();
-    
-    virtual bool load();
-    virtual bool reload();
-    virtual bool clear();
-    virtual bool save(const Call* call);
-    virtual bool batchSave(QList<Call*> calls);
-    virtual bool append(const Call* item);
-    
-    virtual QString    name     () const;
-    virtual QVariant   icon     () const;
-    virtual bool       isEnabled() const;
-    virtual QByteArray id       () const;
-    virtual bool remove ( Call* c ) override;
-    
-    virtual SupportedFeatures  supportedFeatures() const;
-    
-    virtual QList<Call*> items() const override;
-    
-    ///Edit 'item', the implementation may be a GUI or somehting else
-    virtual bool edit( Call* call);
-    ///Add a new item to the backend
-    virtual bool addNew( Call* call);
-    
-    ///Add a new phone number to an existing item
-    virtual bool addPhoneNumber( Call* call , PhoneNumber* number );
+   MinimalHistoryEditor(CollectionMediator<Call>* m) : CollectionEditor<Call>(m) {}
+   virtual bool save       ( const Call* item ) override;
+   virtual bool append     ( const Call* item ) override;
+   virtual bool remove     ( Call*       item ) override;
+   virtual bool edit       ( Call*       item ) override;
+   virtual bool addNew     ( Call*       item ) override;
+
+private:
+   virtual QVector<Call*> items() const override;
 };
 
+
+template<typename T>
+MinimalHistoryBackend::MinimalHistoryBackend(CollectionMediator<T>* mediator) :
+CollectionInterface(new MinimalHistoryEditor(mediator)),m_pMediator(mediator)
+{
+//    setObjectName("MinimalHistoryBackend");
+}
+
 #endif