Patch 1

Hello Leaf,

Hopefully this should be faster and lighter on memory.