Generalized app.js and extracted code into sql_driver.js.
Merge pull request #6 from wyrdathru/master

Generalized app.js and extracted code into sql_driver.js.