Moved run definition to server, using ajax requests to get/post run