Solving a few problems found in code review
Fixing CS problems