A class implementation for ES5