Made constructor more efficient.