Re-factor event command string generation.