Lots of Additions. Added Comments. Testing done for valid inputs.