Fixed preferences, removed debug print statements