Added DB queries, documentation