Refactoring User Code