small refactoring of infobox get chart functions and other small things