Update preference constant names
Fix badly merged code
Fix preferences