Corrected some coding style problems, also renamed escape_function to
escapeFunction