Some further performance improvements