Implementing core data
Small fixes