A bunch of changes to the pitch packets module and some other misc. changes.

Too lazy to document all these changes.