creating protocols nsmanagedobject subclasses can conform to

need to fix warning and errors