Beautify command tokenisation

Replace complicated tokenisation logic for commands with single functionally equivalent function call.

For details for String.prototype.split see its explanation in Mozilla Developer Network [1].

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FString%2Fsplit