Network code refactoring

Renamed Slave -> SlaveHandler to reduce confusion
Refactored Headers to enum Header, to reduce fluff, simplify matching,
and use the type system to make networking safe