Piercing seems to be working on a basic level. Wrote two functions, one which pierces at an angle pi/4 instead of pi/2, and one which checks a number of angles between pi/2 and pi/4 for the first one which gives an IK solution.