WIP - performance improvements