* Moved subject handling code into its own function.