Added median sky subtraction.