setting API domain as a constant. 

Made this mistake too many times.