Added rudimentary database, basic functionality