Replaced some preference-calls with own class