Almost all productipon rules written. Some functions written with error.