Fix issues with serial communication. Add serial communication testing class.