Move update functions to the listeners file