Inline comments added and tests added