More elegant implementation for --random-agent
Minor removal of redundant code
Minor language update
Trivial fix (backslashes should be escaped)
Minor refactoring