refactor analysis routines to their own module
issue #81 make "additional values" optional. Also, made exporting analysis selections optional