-- whitespace
Separate error handling from calc logic
Algorithm reorganization
Var rename
Fix multiple paths resolution issue