Typo fixes and added unit tests