Added checkfiles command, some cleanup