Cleanup of class functions.