Nicer looking code and skip instead of exit for incorrect udfs, qc amount calculation