Adding event listeners
Updating color range
Cleaning up code