Class definition helper which closely maps to ES6 classes.