dont need to convert a string to a string
removing redundant cleanup code
tidying up uneccesary functions