CoreData logic has been incapsulated in KEDataManager class.
Cosmetic changes, pragmas added, removed dead code.