Refactor/analysis iso

Still some stuff to do on this branch.