Some optimizations to reduce memory usage
Merge pull request #1 from rpaleari/master

Some optimizations to reduce memory usage