CS: fix comments + spaces
CS: double quote to single quote convertion + string formatting fixes
CS: fix type case
CS: remove unused args/vars + enforced arg types + various CS fixes
Minor complexity optimizations + code organization