major overhaul - new _state table schema, new extraction file which (for now) only does CSV output