Slightly refactor