Add unit test, fixes typo & cs