Removed unused variables
Some changes to use primer

Follow wiki How-to-write-a-module-using-HttpServer-and-HttpClient