Add a mutable interface, docstrings and inlining.