code formatting and more documentation
[skip ci]