WIP on pure JS revamp