Fixed odd issue with empty tree. Tidied up expression inspection. #3