Refactored main loop.
Minor changes.
Added print function with variable field length.
Minor changes.
Minor changes
Minor changes.
Updated TODO.
Refactored receive loop again.