Javascript skeleton