Added proxy host cmd line parameter
* implemented reindexing in server
* refactoring