Added switch to clientMain and support for 0 or 2 or 4 arguments instead
of just 0 or 2