Code cleanup in tutorial