Few minor code optimizations.