Add documentation, and make things confirm to it