Few integration fixes and test cases