Generic api and classes, db api implementation...