minor enhancements and little lejos hack