Remove unneeded annotations and add a couple of docstrings.