Fixes suggested by Volker

Added .this prefixes
Renamed some variables
Removed AddNeighbour and PrintNeighbour as no longer needed
Added exception to getSubScript