Added features to enable Kaggle competition compatible output.