fn with-prefixes + minor cleanups