convenience macro for fifo peek
added ui_state_test and some ui_state fixes