-- some documentation and style improvements