More hackage towards flows, split off versioning code to separate file