fix typo
Port tomorrow's javascript to wiring and improve all the things