Wrote interface for database implementations and made a few more changes