got rid of signed unsigned cmps in planning; optimized em a bit