Revert "Javascript refactor"

Reverts TeamCobra/ouroboros#22