Feature/slider refactor

DO NOT MERGE

This PR refactors the slider code.