Follow Ruby coding style guide.

Follow Ruby coding style guide:

* Never use `then` for multi-line `if/unless`
* Use `do ... end` for multi-line blocks
* Remove useless `;`

Bug fix:

* Fix `_calc_reqs_per_child`