Moved the event handling from controller to component
Implemented Range object