More than half a million dollars is flowing through the state to aid the removal of aging dams, including two in the Merrimack Valley.