Interface design nearly done. JS functions pre-defined.