Rebar migration

rebar migration and test fixes