added query

Added query function - will create an html interface for
add/remove/query that does not process the entire list
some general cleanup