Updates for test cases, added exception test case and removed un-used functions