Mostly debugged - last clean run had only minor bugs that were fixed