integration testing and fixes