minor refactoring (thought this was included in my last push
merged in master branch
Merge pull request #9 from adamreis/adam_path_calc

Minor refactoring that somehow wasn't included last time