Slider stuff and lineAt function