Code refactor: everything is in JS now. Upgraded from prototyping