Inlineable classes

This WiP PR will host the inlineable classes optimization. Follow up in the comments.
This is again more restrictive than necessary, right?