Made onclick on circles and refactored code.