Removed extra commas
Renamed 'var char' to 'var separatorChar'

'char' is a reserved word so shouldn't be used as a variable.