reorganizing scripts and script query

Reorganized the scripts (and renamed them) and put them in a new folder
called scripts. Also added jquery code to interface with the scripts.