Glsl function - add ModularProgram

Done. I should also go over all comments / docstrings carefully before we merge.