Changed to a sinatra app to allow for server side control