Work on the optimizer (will need to come back after rearranging develop)