Some further optimizations