add jquery
decoupled and refactored javascript to submit settings