Fixed step-support, removed “filth”

Removed “filth” by replacing for() with while().