Refactor charts