Several updates to the main ray integration

The main change is the input parameters. Now, one can set arbitrary
start and end ray points. There are still a few things that needs to
be fixed but the skeleton is there. Also, the functions were moved from
the main file to other files (integration.h and pre_integration.h).
Several minor changes to accommodate previous changes.