Update UI.c

Added delete to all other functions
Added max overflow protection on all functions