Refactor: move code