Minor function changes