Pre-calculate the indexes to embedded controllers.
Improved testing