minor style improvements + some more doc