Added comments and made a few small changes. Nothing noticable.