Altering app structure

Moving JS to shared library under new top-level dir
Fixing setKey method location