Optimised class def