Class structures are corrected. Ready for threading.