Normalize inputs