add expect count to index test
move query parse code out of index.html
add settings object
switch to settings model
initial settings functionality