Refactored to remove unecessary chomp.