Added alert type to info callback parameters and refactored code.