Reformatted and added a couple docstrings.