Added cache clearing method
Styled code. Added colour function for the dots.