move javascript to lib/ folder to follow node conventions