Start output database

Still needs work, but basic indexing is done