Updated various routines