Refactored the summarization method so that it works for ipv4 and ipv6.Cleaned trailing spaces.