Refactoring Tray and Issue

In the middle of the huge refactoring. Most things are broken, although
I've already managed to update core classes' behavior, there is still
much to do.