Added several improvements.