Start of packet re-write

Done a couple - I still need to do more - please do not touch until I'm
done :P