include environment.h in even more places...

because otherwise the build is broken (oops!)
fix clint errors
documentation