Add Some Optimization from @Cl3Kener