improved testing, commenting, and brace-counting