In process refactor