Dotcase: minor cleanup

Check status variables once per method rather than repeatedly in
loops. Also, rename confusing variables which represent heights and
widths.

Change-Id: If0c98faa36640e233ccce7e0353aa8a30be344b8