Code reorganization, major performance improvements
Authored by: artyom-beilis 2013-01-02
Parent: [r2225]
Child: [r2227]