Performance and memory improvements
