Documented the Code and cleaned it up a bit...