add normalize kwarg to rms_score
modularize; move json output code to to_json