R5 classes

Upgrade to master