Added escaping special chars in optnames
Clean up + commenting