Fix integration tests
Clean up mapper and gateway modules