moved constants to config, added permanant localhost key