Some simple optimizations