[RFC] Refactor codebase

cc @mlubin @IainNZ 
Let's clarify the sign flip, even if gurobi doesn't.