Rewrote parts of the script to lower global footprint.
Added basic options documentation to the readme file.