Updated lots of functions