fixed type / code cleanup