refactor and step fixes