Added more robust uri and uri part resolution for assets.