Some little optimizations