Removing duplicate method calls