added state-to-state functions, converted other names to lowercase, fixes in Gamma_22