Massive refactor.
Extra 'for' in comment.