pre-merge commit
Added relevance matching and changed code to work with new database
fixed merge conflicts