Fixes based on first batch of Unity tests