Lets put this big if block in its own method, which will return true or false.