Reorganized GDA code and have buggy outlier optimization

Reorganized GDA and analysis code to make it more modular. Also
implemented an outlier remover/optimizer, but slightly buggy. Commented
out its call and will fix tomorrow.