Improve lib/header path detection
Clean up