Refactored code and changed some style things

Something wrong now. i can not click on anything when chart drop-down is
visible. that was not before