More unit tests and minor updates based on code review