Add protection to invalid packets and refactor UDP class