Cleaning up Qt4 dependencies and Fixing unit test cases