Update documentation and rename variables for the StepsFactory.
Simplify some logic, and fix javascript bugs.