John's addition. This classes may have some few errors. Debug them a bit. I have commented out the errors that I saw.