reorganize/simplify #collectMain