Refactoring. Trying to map r to (0, pi/2) was a stupid idea.