Minor change
Rework tests to be more accurate and isolated with various small fixes