Preferences re-rewrite

Using NSUserDefaults' getObject:inDomain: and
setObject:forKey:inDomain:, preferences code has been reduced.
Tweak.xm has been reordered for better understanding of code.
Needs testing.