Move preferences keys to Defines and register them to user defaults on application launch

Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>