Some documentation, but I think the code is pretty straightforward