Removing whitespace at end of code blocks