Added some missing functions and associated test cases