A javascript base class for OOP