Refectored the main file to be less cluttered and created a Figg object that holds all the main configuration loading and parsing logic.
Added a default_index option that determines what figg is used when no env is provided.