Cleanups.

Code format. 
Fixed compile warnings. 
Removed unused CoreData Entity. 
Removed unused imports.