Added utility functions `defclass` and `extend`.