escaping marks in <code>...</code> added, main refactored