Made several improvements.