Merge pull request #1 from chinchliff/master

initial setup for study search indexing
merging and other things
added some edits and added back delete
stable indexes and mostly working everything else
fixing tree delete
merged
merging
making progress on new db model for remote and local studies