changes check from PAYMENT to PAYMENT-JUNK to avoid conditional branch from being executed...temp solution for now
fixes cause and solution delete problem, and simplifies code
makes lists sorted by using order by