Added beginnings of DB, plenty of work left making queries bullet-proof against non-existant data and corner cases