Adapted with mykeys and keyring class style and constructor changes.
Bind events in constructor.