Added Comments and Removed Unused Variables