On Lie algebras and cohomology associated to congruence subgroups