Made pruning of zeros and empty lists configurable.

Addresses issue #17, users can now specify whether zeros and lists should be pruned by setting the optional parameters pruneZeros and pruneLists.