Simplify the PinForm.clean method

I have a gut feeling that we could refactor some code out of this method, but for now I'll just clean it up a bit.