Clean up duplicate implementations of resolvePath and calculateTotalCharacters that were causing syntax errors.