Added config system that sends variables to javascript.