AVALANCHE: Some more refactoring