Update SJ.py

various code improvements
range checking has its own function
480 as quality selectable