Abstract hash to transaction common. Add support for changing plans