Fix compilation errors, now rebar compatible.