First pass at the pinmode refactor post-thread discussino