Some refactoring and new charts