cleanup and docs in main.swift