Switch to using char for variables due to comparison issue.
Add init tests.
Fix formatting.