Use class name for saving as a listener instead of class itself

There are several issues with holding a class as an observer object
after reloading a code. So it's more safely to hold a class name instead.