add MagicalRecord
rewrite to use MagicalRecord
fix project file
fix import
move import into category
move import into category (continued), improved error handling