Prototype refactoring