Commit class templates lcm, gcd, conditional