improved documentation, fixed stylistic consistency