Added a class for handling preferences