Added minimal test-cases.
  Minor updates.

  Added:

        use strict;
        use warnings;

  Only add the callback if the caller can do so.