Simplied javascript

Modified the javascript to simplify the loop
Dropdowns work

The dropdowns are now bound together and work
Basic forms are bound
No significant changes