azure - some refactoring