Add Box ID counter and a bit of prelim stuff to ui.h

Works on #1