Moved communication state into its own struct. Havent solved ISR handling yet.
Moved global communication state into struct