Refactoring charts
Cleaning up after rebase to latest upstream code