Refactored brejep's Ash for JS to workj with the Platino engine