MDL-39854 reimplement frankenstyle support and add classloader

Thanks Ankit Agarwal for peer-review and bug reports!