Preparation for fixed OCTGN

working directory reverts to old code
added new pile fns