Organized some of the UI border drawing code

It'll be easier to draw tabs with the way this is now organized yay