Refactoring to Pine