changed theme and refactored code