Fixed bugs; improved reporting of main application