Overhaul of config code to jquery and correct path