Refactoring -- Handled the X-Range checkbox