Reorganized part of GreedySolver, added test to unit tests