moving preferences handler creation inside 'onCreate' method