adding a way to register classes

since it is impossible (or quite complicated rather) to autoload
classes.