updating for hydro: major refactor and fixes