Refactor to match 0.6 overhaul