refactoring in graph item, step and algorithm classes