Minor tidy up. Adds function name to end function