Making misc changes and adding the test case for export