small optimizations, defined constants