Start refactor of the infobar

Progress on #2 - reduce duplicate code
Enter TestInfobar to try the rewritten code.
Enter SwapInfobar to go back.
Currently functional but more limited than the other versions.