Refactor to works with new api. Clean up.