Refactor for better code style.