Made things pretty
Fixed averaging bug
First connection assumed master
Connections handled better