extended docstring; added modes attribute; minor changes
initial commit