Fork of a javascript Accrete port