moved event routing encoding into event package. started some tests.