Issue 4, constructor updated, preserve local database functionality added.