Fix typo in TODO comment.
Optimize 'expr' usage and few indent fixes.
Fix string comparison by 'expr'.