Modified to run from any direction
Renamed files to more appropriate names