Silly mistake with declaring string functions as class methods