relay: move more classes to internal