refactor power flow, create DC power flow, and get first version of RATC working