Refactor of code.