rename std* files to mem*. misc edits