added a proxy for ajax requests and seperated the control service from the hosting code