Clean up trailing white spaces.
Add documentation describing each method.