* Drop some unnecessary len() calls

Replaced by enumerate() where feasible.
* Spacing fixes for assertions