Moved backtrack functions to util, added RK3 version