Creates a much cleaner initialization procedure inside the maximize function. Also gets
rid of the log_maximize function and turns the regular maximize into a log_maximize, but
now it is robust for negative values.