mali: Some refactorings for consistency