Implemented some base classes, exceptions.