Added: base_name option.
Added range exporting. Code cleanup.