SEVERAL CHANGES COMPARE WITH MAIN.INC.PHP