Add update functions to mouse class and other small changes