[RFC] Refactor codebase

cc @mlubin @IainNZ 
True, guess I've just never seen an LP return a suboptimal solution before ¯\_(ツ)_/¯