Minor refactoring to grading.py based on John's suggestions
Replace split function with textwrap.dedent/indent