Heavy refactoring, adding preference change listeners, improved TimePreference.java.