New abstraction called 'resources' was invented.

Existing layout and event classes were made to extend the new one.