Fixes #9

gets ready for services
separates packets and errors from the other code