Added some changes

Added comments a little, and added little changes into code