A few stupid optimizations, for testing