removed unused import
created date engine
moved preferences handler