Splitted Into 2 files
Some corrected