Attempting to improve performance. NOTE: this commit breaks compatibility with current versions of krun -- it requires a patched version I'm experimenting with.