Moves slider definition to a different location to attempt to resolve a null pointer issue.