refactoring of 'steps'. documentation. general code cleanup