ECDR-32: Cleaned up code to eliminate uncessary object creation.