Improve slider functionality