Updating test cases, and fixing few more bugs