Refactor again by using instance variables instead of passing around argments.