added 1d grid approach shader for variable amount of slits. cleaned up some code. fixed the check for p,q factors computation.