Added a few Comments and cleaned it up a bit