prototyping

-changed to prototype structures
-fixes use of static functions
-changed pingmessage to use split message