Helper class for Core Data handling in Swift