Merge branch 'scenario-refactor' into 'master'

Factor out socket communication with a server

See merge request !147
10 jobs for master
in 1 minute and 26 seconds and was queued for 2 seconds