Refactor; wire up R source object machinery as well