add solr support
clean up code