modify solution so that compile time does not depend on runtime, debug output cleanup, some testing in main