Add first stab at firmware
A few code cleanups
Firmware work
Add io_expander