Modified web server and client to use ajax calls for setting gains etc.