Local modifications to make this compile/work