[UPD] Some speed optimizations