Refactoring + paste support