Control function as base for all UI controls