Increased accuracy of EMC mapping and fixed all off-by-1 EMC errors

To clarify, all EMC values are still integers, but now it rounds at the end of calculations, instead of during them.