Rewriting classes as prescribed in Javascript: The Good Parts.