Slight performance & stability improvements
TODO updated