Object oriented implemented and various optimizations.