Refactor separation  of code.