Added z axis to AABB's and tweaked the math to allow for the z axis.