Integrated RelayHandler into packet processing.
Replaced Singleton-ish implementation inside a class with template.