optimizations and additions in value/macros.h