Some minor updates and unit tests