Moved onclick to mapper class.

It seemed to make things untidy in its own package.