Inlineable classes

This WiP PR will host the inlineable classes optimization. Follow up in the comments.
Didn't review this. I assume its copied. Please advise if otherwise.