Commented with plans for some optimizations.