added a bunch of new functionality - account db, template events, etc