Fix several unit tests

Fix several unit tests and add the last but not least St_Is3D function.