Added logging support.
Missing $self.
Using the opts helps.
Added logging and some reorg. of the the Controller code.