Moved sanitization functions into a class