Base class for javascript classes to allow extension