added constants to server and client side; added a method exposing constants in json