Improved and added tests for the inspect functions.