First refactor for resource charts. 100 fewer lines of code!