Refactored code
Refactored charts