Made the trackbar methods more functional