moved the code base out of core data into realm