Initial skeleton for js code, and some leftovers