Fixes and completing core data stack