Update system now uses HTTPS connection

- Add some curl checks
- Refactor code