Added optimizations.

Next step: Add true file and calculate other metrics.