(ref) splitted onsole and webservice versions into two files