Added code to (de)activate titles. Fixed missing check for $job.

Main code rev. 1929