Cleanup code for apostrophe check