Python-like classes in JavaScript