Maemo: Extracted most plugin code to a separate class, so we can use that as listener.