Adding bounds checking for plane (may need to adjust it some)
Also changed at least one more float to double