#23 Continuation of heuristic refactoring