Added GUI, improved unit detection

Each unit will now only ever be fired once, meaning their hook functions
can be used as unit counters.