Updated unit tests, minor fixes/tweaks