Refactor and chart added