reverted changes that may affect binary compatiblity. little code cleanup