A framework for modular computations in Singular