Document, reformat, remove unused exports