Improving script so that it can be executed from any directory.
Using allocator as a template parameter.
Cleaning up unused code.