Reorganize sources, add CoreData example project and tests