fix tab-stops, cleanup app code