The base javascript class with some useful features.