Documentation and style
Improvements to environment implementation & docs