fully understand uiFactor; refactor wrapper.lua; add unitframe.lua; fix minor bugs