Function explanation, other fixes