tidying up
Optimizer done. Close #3.