Little refactor on getString