Documenting all methods, and a slight cleanup