Added support for $BLOCK_INSTANCE  and better rounding

Added support for $BLOCK_INSTANCE and better rounding