first commit of refactor.  implementing some custom types as classes, to
handle path and variable manipulation more easily
some steps towards refactor, currently not working though
minor changes to PathStr class, still not working
made some more progress in the custom type refactor, I think it is
working now...
tidied, added descriptions to classes.  tested some more, fairly
confident it's ok
pushed testing branch into master