Some minor refactorings
Restructured integration tests