Improved class instance and function support.