Optimize + File Selection

Optimized the engine with array multiplication and added in better file
selection