Update based on jvazquez's suggestions.