Use curl instead of wget, and other minor edits