A lot of documentation and some small refractorings.

3 jobs for master in 2 minutes and 14 seconds