Final tweaks to get unit tests passing