added core data support, fixed previous UI problems