Fix language heredity.
add docstrings.