Cleanup of main mod class.