Add documentation and fix bug in inspection selection