Moved line rejection code out into its own method.