Refactored. Also added update URL