Further simplification and performance improvements