Started implementing basic database functions.