Still debugging merge. Don't think it'll have to be rewritten though.