Merging new_sequence branch

Code is mostly complete to work with the new search database style.